LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apache works locally but not globally (https://www.linuxquestions.org/questions/linux-newbie-8/apache-works-locally-but-not-globally-809073/)

theNbomr 05-22-2010 11:31 PM

So now we have learned that the router is probably not forwarding from the WAN side of your connection. In a Linux based firewall, we would normally do this in two stages:
1. mangle the packet, so that the destination port is now the port used by the server.
2. re-send the packet on the LAN interface, to the LAN server host.
Do these steps make any sense in terms of how your router setup is done? Are you sure that some other rule is not swallowing the packet in the router, or sending it somewhere else?

--- rod

evaristegalois 05-22-2010 11:54 PM

I did not change the apache conf files at all except add

Quote:

# added servername to avoid the could not determine fqdn error
ServerName myname.homelinux.org
to apache2.conf

Quote:

sudo apache2ctl start
starts without error message and I can see http://192.168.0.150 just fine (the 'it's working' index file). But that's local. I to doesn't seem to get out on port 80.

I put a screenshot of my router settings at

http://www.streetgreek.com/anderson/di-624.png

evaristegalois 05-23-2010 10:34 AM

I didn't add anything to my apache configuration files except

# added servername to avoid the could not determine fqdn error
ServerName myname.homelinux.org

to apache2.conf. So if I need to do anything else please let me know. (Although, as I said, apache works locally.)

Here is a screenshot of my router settings:

http://www.streetgreek.com/anderson/di-624.png

(And ssh-ing in works from an external computer, so port 22 is open, which is confirmed by doing a port check on http://ping.eu/port-chk/, whereas port 80 is closed, also confirmed by http://ping.eu/port-chk/ -- )

custangro 05-23-2010 10:57 AM

Quote:

Originally Posted by evaristegalois (Post 3978455)
I didn't add anything to my apache configuration files except

# added servername to avoid the could not determine fqdn error
ServerName myname.homelinux.org

to apache2.conf. So if I need to do anything else please let me know. (Although, as I said, apache works locally.)

Here is a screenshot of my router settings:

http://www.streetgreek.com/anderson/di-624.png

(And ssh-ing in works from an external computer, so port 22 is open, which is confirmed by doing a port check on http://ping.eu/port-chk/, whereas port 80 is closed, also confirmed by http://ping.eu/port-chk/ -- )

You may and or may not what to do this (but it's for debugging purposes only)...

But have you tried turning off your firewall on your gateway/router to see if that works?

That way you can see if its a firewall issue or if its a forwarding issue....

theNbomr 05-23-2010 02:04 PM

Quote:

(And ssh-ing in works from an external computer, so port 22 is open, which is confirmed by doing a port check on http://ping.eu/port-chk/, whereas port 80 is closed, also confirmed by http://ping.eu/port-chk/ -- )
So there seems to be some inconsistency between what your router is doing, and what it claims to be doing. Perhaps the router is FUBAR. Can you try power cycling the router?
--- rod.

evaristegalois 05-23-2010 04:07 PM

I just found out that if I turn on Remote Management on my router (on port 80), it opens up port 80, but the http://myname.homelinux.org goes to my router, not to my apache index page. So the router seems to be fine, now I just need to figure out how to forward it to my desktop.

evaristegalois 05-23-2010 04:19 PM

I just found out that there is a tiny button I needed to enable on the router, which I failed to do. Problem solved. Many thanks!

theNbomr 05-23-2010 05:45 PM

For the benefit of others who may read this in the future, (and for my curiosity) can you give enough detail about the tiny, but magical, button that others may not fall victim to the same trap?

--- rod.

evaristegalois 05-25-2010 12:48 AM

You can see it on my screenshot provided above. You need to click on the edit icon for the http virtual server and then click on `enable'. Then the square box next to the virtual server line will be checked rather than unchecked (which it is in the screenshot). Thanks again for your help. Couldn't do it without you guys.


All times are GMT -5. The time now is 11:51 AM.