Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: Apache setup problem

  1. #11
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by Ximbiot View Post
    The Apache Virtual Hosts documentation has some examples I've found useful in the past.
    I have used that documentation and examples as starting points,
    but especially the documentation is incredibly hard to put into practice,
    and the error messages are more or less cryptic.

    I think apache must be the worst program I have ever worked with.
    So far I've tried and retried for a couple of weeks, and the closest I've
    been was to get "It works" regardless of what site I tried to open.
    If it works, FIX IT! (Bill Gates)


  2. #12
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by Ximbiot View Post

    Code:
    Listen 127.0.0.1:80
    Then only browsers running on the local machine would be able to access the server.
    Right now it would be OK to only access it from this computer, but I plan
    to set up an older computer as a file and web server, only to be access from
    the LAN.
    If it works, FIX IT! (Bill Gates)


  3. #13
    Join Date
    Jan 2006
    Location
    United Kingdom
    Beans
    2,787
    Distro
    Kubuntu 6.06 Dapper

    Re: Apache setup problem

    If you're struggling it is probably a sign that you are trying to run before you can walk.

    Stick to getting a single site up first and once you're happy with that then move on to adding an additional host. Trying to get ten sites working when you can't do one is surely asking for trouble.

    Mathew
    www.NewtonNet.co.uk - Now supporting IPv6!

    ~ Please don't use PM's to request assistance - post your query on the forum and share the discussion - if you've got a problem chances are you won't be the only one! ~

  4. #14
    Join Date
    May 2008
    Beans
    69

    Re: Apache setup problem

    Quote Originally Posted by ingeva View Post
    No output from the lsof command, so I guess no one is using port 80.
    I think the "no listening sockets available" error may have to do with the fact that you can't listen on an IP unless it is actually bound to an address. So, unlike connection via a client, listening on IPs like 127.0.0.2 is only going to work if you have explicitly bound that IP to the loopback interface.

    Quote Originally Posted by ingeva View Post
    I haven't tried using the same IP for all domains, but I could try that.
    In that case, what should be in the hosts file?
    You can alias all the IPs to 127.0.0.1. Only the first will come up in a reverse-lookup, but I don't think this should affect you. /etc/hosts:

    Code:
    127.0.0.1 intertrafico anotherhost yetanother yya
    ...and so on.
    Last edited by Ximbiot; August 20th, 2008 at 03:37 PM.

  5. #15
    Join Date
    May 2008
    Beans
    69

    Re: Maybe....

    Quote Originally Posted by ingeva View Post
    Right now it would be OK to only access it from this computer, but I plan
    to set up an older computer as a file and web server, only to be access from
    the LAN.
    Then `Listen 80' should be what you want, to ask Apache to listen on all available interfaces.

  6. #16
    Join Date
    May 2008
    Beans
    69

    Re: Maybe....

    Quote Originally Posted by ingeva View Post
    the closest I've
    been was to get "It works" regardless of what site I tried to open.
    Do as Matthew suggests. If you can get an "It works" message, then first start by putting the data you want to serve in the location "It works" says it is serving. Once you can see that, then try changing the location to where you really want to serve the data from. Once you have that working, then try adding additional virtual servers at new locations.

  7. #17
    Join Date
    Apr 2005
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Maybe....

    I believe by default /etc/apache2/ports.conf is included after httpd.conf, so perhaps make sure nothing in ports.conf is overwriting what you've placed in httpd.conf.

  8. #18
    Join Date
    Apr 2005
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Maybe....

    also, if I understand what you are trying to do - ie test sites internally, I think your httpd.conf file should be empty, ports.conf should have one line "Listen 80", your virtual host files should contain something like:
    Code:
          1 NameVirtualHost *
          2 <VirtualHost *>
          3     ServerName com.someInternalDomain1
    Then as Ximbiot said each machines host's file that you are testing from should have something like:
    Code:
    10.10.10.1 intertrafico com.someInternalDomain1 yetanother yya
    assuming 10.10.10.1 is the webserver.

    if you are going to test from the webserver itself, then you would probably want to change the host file on the webserver as well to be as Ximbiot suggested.

  9. #19
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by Ximbiot View Post
    Do as Matthew suggests. If you can get an "It works" message, then first start by putting the data you want to serve in the location "It works" says it is serving. Once you can see that, then try changing the location to where you really want to serve the data from. Once you have that working, then try adding additional virtual servers at new locations.
    That's what I did.
    If it works, FIX IT! (Bill Gates)


  10. #20
    Join Date
    Jul 2008
    Location
    Sandvika, Norway
    Beans
    406
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Maybe....

    Quote Originally Posted by mbeach View Post
    also, if I understand what you are trying to do - ie test sites internally, I think your httpd.conf file should be empty, ports.conf should have one line "Listen 80", your virtual host files should contain something like:
    Code:
          1 NameVirtualHost *
          2 <VirtualHost *>
          3     ServerName com.someInternalDomain1
    Then as Ximbiot said each machines host's file that you are testing from should have something like:
    Code:
    10.10.10.1 intertrafico com.someInternalDomain1 yetanother yya
    assuming 10.10.10.1 is the webserver.

    if you are going to test from the webserver itself, then you would probably want to change the host file on the webserver as well to be as Ximbiot suggested.
    Looks sensible. I'll try that.
    It looks like the IP-address of the server computer is not guaranteed. The router sets up the addresses, and this router doesn't seem to accept a fixed setup like binding an IP address to a MAC address. However, right now it has the IP defined in the hosts file, and if that's sufficient I might make it work.
    I won't be able to test this until tomorrow (It's late here now).
    If it works, FIX IT! (Bill Gates)


Page 2 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •