Aster Posted May 29, 2008 Share Posted May 29, 2008 Hi all, This problem has been driving me mad for a over a week, so I really hope someone can help. I have a debian linux box sitting behind a 'Livebox' Sagem router which I want to use as a web server. As this router (supplied by my ISP) is particularly annoying, I can't use port 80, so want to use port 18080 and have opened it up in the firewall. I have ADSL so I have also set up a dyndns link. The site works fine when connecting locally from another PC on the LAN (ie 192.168.1.11:18080) so I assume Apache is working ok on port 18080, but won't work when I try mysite.dyndns.org:18080. Using dyndns' open port tool it says this port is open. I have tested this further by stopping Apache, port 18080 is 'refused', then when Apache is started again, it is once again 'open' - so the request must be reaching Apache - right? I am really confused, port 18080 works locally, it can be reached with dyndns' port check tool, but refuses to serve web pages. Also, there is no record in Apache's access log of anything outside the LAN (should there be?). I'm a newbie to both linux and web servers but I have tried to make changes to my virtual hosts configuration, tried using iptables to route it back to Apache's port 80, tried reinstalling apache and a few other things which now slip my mind, but to no avail. Does anyone have any idea where I'm goin wrong? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/ Share on other sites More sharing options...
blackcell Posted May 30, 2008 Share Posted May 30, 2008 How are you trying to access it from across the internet? I am new to this too but I think you need to throw some additional info out. Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-553586 Share on other sites More sharing options...
Aster Posted May 30, 2008 Author Share Posted May 30, 2008 Thanks for replying. I've got a windows laptop as well as the Debian box, which I'm using to test both on the LAN (using 192:168.1.11:18080), and internet (using mysite.dyndns.org:18080). I've also tried from work, using both the dyndns address and myIpaddress:18080, and just get the 'Unable to connect' error. I wondered if Apache has some way of blocking external ipaddresses, though when I check the config files I definitely have: Order allow,deny allow from all Is there anywhere else I should check. Any help much appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-553763 Share on other sites More sharing options...
wildteen88 Posted May 30, 2008 Share Posted May 30, 2008 What happens if you use your servers ip address (not the internal LAN address) instead rather than dyndns.org address are you able to connect then. Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-553769 Share on other sites More sharing options...
Aster Posted May 30, 2008 Author Share Posted May 30, 2008 Unfortunately when I use the actual IP address I get the same result - still 'Unable to connect' Thanks for the suggestion though. Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-553806 Share on other sites More sharing options...
wildteen88 Posted May 30, 2008 Share Posted May 30, 2008 Ensure that your router is correctly port forwarding port 18080. Im not a linux expert but perhaps something not quite setup right on Debian. Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-553832 Share on other sites More sharing options...
Aster Posted May 30, 2008 Author Share Posted May 30, 2008 Well I'm fairly sure that it is reaching Apache, as when I stop Apache and use the 'open port tool' on dyndns.com it comes back 'refused' (which they say means the port is not blocked but nothing's listening on it) and when I start Apache again and retry I get port is 'open' - ie there is something listening on it. This must be Apache as it's the only server I have listening on any ports apart from mysql, and that's only on localhost (and a completely different port). It'd be useful to know what dyndns' tool uses to check - so at least I could see what Apache is responding to and what it won't - does anyone have any ideas? I'm stuck! Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-553855 Share on other sites More sharing options...
wildteen88 Posted May 30, 2008 Share Posted May 30, 2008 Have a look in apache's access.log and/or error.log too. Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-553870 Share on other sites More sharing options...
Aster Posted May 31, 2008 Author Share Posted May 31, 2008 Sorry for the delay, I've been trying to use a packet sniffer to work out what packets were arriving, but I couldn't get it working. The only records in access.log refer to local connections and error.log (level set to debug) show nothing untoward. I'm still completely lost. Considering a reinstall which I'd rather not do, but if I have to... Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-554349 Share on other sites More sharing options...
eldorik Posted June 2, 2008 Share Posted June 2, 2008 Have you set up a virtual host on the modem? You need to tell the modem to redirect all port 8080 traffic to your webserver local IP. Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-555826 Share on other sites More sharing options...
trq Posted June 2, 2008 Share Posted June 2, 2008 Also, if your trying to access the site via name from within the LAN, the machine your accessing it from will need an entry within its /etc/hosts file. Your name (*dyndns.org) won't resolv properly from within the LAN. Quote Link to comment https://forums.phpfreaks.com/topic/107836-apache-works-locally-but-not-remotely/#findComment-555853 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.