Problem with Apache / CentOS

deicistdeicist Manchester, UK
edited May 2006 in Science & Tech
Hi alternative OS guys :) I'm trying to set up a web server using a nifty distro I found Here. It's built on CentOS and utilises the Blue Quartz WebGUI which is a port of cobalt's OS for their RAQ550 web servers. I've tried asking about this on the NuOnce website with no luck so I'm hoping the problem is more generic and someone here can help. Basically I can't get my server to respond to external requests. I can access the site I've setup from my internal network but from the external network I get a blank page. Here's my setup:

Site is published on an internal address of XXX.XXX.XXX.102 port 80. My router is forwarding requests from my external address, port 80 to this internal address. For testing purposes I created a site called 'www.test.com' and when I got to my external address from another PC my browser status bar shows 'waiting for www.test.com'...which would seem to indicate some kind of communication is taking place. However I just get a blank page (note: not a 'page cannot be displayed', just a completely blank page). I'm a little stumped now, I've tried lots of combinations of IP addresses and ports but can't get anywhere with it. The only thing I can think might be causing an issue is DNS... basically I haven't done anything with DNS, and obviously I don't actually own the test.com domain so maybe the webserver is trying to look up itself using that domain name and having problems? I dunno... anyone got any ideas?

Comments

  • drasnordrasnor Starship Operator Hawthorne, CA Icrontian
    edited April 2006
    I agree it's probably a DNS issue. In order for test.com to properly map to your router you'd need to set test.com to your router's IP address in the hosts file on your client. Alternatively, you could try to browse to your router's IP address. Your router should forward all http port 80 stuff it receives to your LAN server.

    My first troubleshooting step would be to get on the server box and try to access the webpage a la http://127.0.0.1 and start from there. If that doesn't get your webpage then you have more serious issues.

    -drasnor :fold:
  • deicistdeicist Manchester, UK
    edited April 2006
    drasnor wrote:
    I agree it's probably a DNS issue. In order for test.com to properly map to your router you'd need to set test.com to your router's IP address in the hosts file on your client. Alternatively, you could try to browse to your router's IP address. Your router should forward all http port 80 stuff it receives to your LAN server.

    My first troubleshooting step would be to get on the server box and try to access the webpage a la http://127.0.0.1 and start from there. If that doesn't get your webpage then you have more serious issues.

    -drasnor :fold:

    Cheers Drasnor, but the problem is that although requests to my routers ip address do appear to be forwarding (as shown by browser status bar changing to test.com) the page isn't retrieved. To re-iterate, I'm not browsing to www.test.com I'm browsing to my routers external ip address and the status bar is then changing to www.test.com. From my LAN I can hit the page on the servers ip address no problem :confused:
  • primesuspectprimesuspect Beepin n' Boopin Detroit, MI Icrontian
    edited April 2006
    It could be a problem with the apache config. Do you have any virtual hosts defined? It might be looking for a host header that isn't there.
  • citrixmetacitrixmeta Montreal, Quebec Icrontian
    edited April 2006
    have u tried to modify ur local host file and hit it internaly?

    as in

    example: www.test.com 192.168.1.103

    when u do that change, make sure its done right by pinging it, it should resolve ur private ip not public.


    isolate the problem, 4get abour your router/port forwarding etc..

    get the site loaded localy 1st.

    brian is right, maybe its a vhost issue
  • deicistdeicist Manchester, UK
    edited April 2006
    The site is fine locally, on the localhost and on any other machine on my internal network via the local ip address (ie: browing to http://xx.xx.xx.xx).
  • citrixmetacitrixmeta Montreal, Quebec Icrontian
    edited April 2006
    deicist wrote:
    The site is fine locally, on the localhost and on any other machine on my internal network via the local ip address (ie: browing to http://xx.xx.xx.xx).

    hitting the site using an IP or hostname are two diff things.


    if you configured (accidently) the site as a vhost, you will never be able to see the content unless you hit it by domain name.

    just for troubleshooting, try my suggestion
  • deicistdeicist Manchester, UK
    edited April 2006
    Ah, I didn't realise that, cheers matey, will try that now.... just need to reinstall first :)
  • citrixmetacitrixmeta Montreal, Quebec Icrontian
    edited April 2006
    deicist wrote:
    Ah, I didn't realise that, cheers matey, will try that now.... just need to reinstall first :)

    no prob at all, lets get that sucker fixed :):beer:
  • deicistdeicist Manchester, UK
    edited May 2006
    Right, after leaving this alone for a while I decided to go back to it. Here's where I am so far.

    I have a website (www.petrehome.com) hosted on my IIS box which works fine using a port redirect across my router.

    I'm trying to migrate this website to a CentOS/BlueQuartz system. Basically I want the functionality and ease of use that this system offers... From a web based GUI it offers:

    User based FTP access setup automatically.
    Built in SMTP server setup automatically
    webhosting of multiple virtual hosts using apache setup automatically.

    so, I setup the petrehome website on this box using ip address XX.XX.XX.101 (XX.XX.XX is my internal network) and set a forwarding rule on my router to forward a port on my external address to this internal address, port 80. then I set a line in my hosts file to point www.petrehome.com to this internal address. Now, if I hit the internal ip address or www,petrehome.com from a machine on my internal network (the one with the line in hosts) it works fine. However when I do it from an external source it pulls up the page from the IIS box. I've double checked the port forwarding etc... what seems to be happening is the CentOS box is recieving the request, then forwarding that request to the actual IP for www.petrehome.com... which I don't really get, but that is what's happening as far as I can tell from several hours of testing.

    here's what's happening.

    Internal network
    10.6.6.4:9002 = IIS box hosting petrehome.com
    10.6.6.101:80 = CentOS box hosting petrehome.com

    external
    my.ext.ip.addr:9002 forwards to 10.6.6.4:9002
    my.ext.ip.addr:8001 forwards to 10.6.6.101:80

    seperate windows machine with this line in hosts
    10.6.6.101 www.petrehome.com

    On my domain name forwarding I have www.petrehome.com forwarded to http://my.ext.ip.addr:9002

    if I go to www.petrehome.com or http://10.6.6.101 from the windows machine (internal) it works fine (pulls the page from the CentOS machine).

    if I go to http://my.ext.ip.addr:8001 from an external machine it pulls the page from the IIS box (wtf??)

    however, if I turn the CentOS machine off and go to http://my.ext.ip.addr:8001 I get page can not be displayed... which suggests the request is hitting the CentOS machine at some point.

    meh, I'm completely stumped at this point.
Sign In or Register to comment.