Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th January 2009, 02:02
selectoe selectoe is offline
Junior Member
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Opening apache to the internet

Hello, I am wanting to open up my apache root directory (var/www) to the internet. I can access the default page on the lan by typing 'myserver' into the browser address bar.

I have a router which is port forwarding port 80 to the server's internal ip address. When I try to enter my external ip address it gives me the error message "The connection to the server was reset while the page was loading".

What do I need to do to give everyone access?

Thanks in advance.
Reply With Quote
Sponsored Links
  #2  
Old 27th January 2009, 04:28
Allen15 Allen15 is offline
Junior Member
 
Join Date: Jan 2009
Posts: 29
Thanks: 4
Thanked 0 Times in 0 Posts
Default

if you can browse it locally, you may be browsing it with only ARP. Are you browsing it on your local lan from Windows machines, or other Linux systems?

This sounds like it may be the root of the same problem I'm having, where I get that same error message, but I have no other systems on that local network segment to check. Hopefully an answer will work for both of us.

If you don't have the same problem, this may help you too: What do you have for DNS pointing to your router? This is sounding more and more like an Apache configuration issue, since I can browse by IP address, but not by name, but I can ping the name externally, and it resolved to the proper IP address. If you can't browse by IP address externally, it really sounds more like an Apache configuration problem, where you haven't set up proper permissions in Apache to serve those pages to the world at large, or you have some firewall configuration that is rejecting requests from anything outside of your local network.

Check your firewall settings, just to make sure? Good luck.
Reply With Quote
  #3  
Old 27th January 2009, 16:21
adam0x54 adam0x54 is offline
Junior Member
 
Join Date: Jun 2008
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
Default

Like Allen said, it seems like a firewall setting. Go to dyndns.com and create an account to have you own fqdn so you dont have to remember ip addresses.
Reply With Quote
  #4  
Old 27th January 2009, 19:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Also make sure that your ISP doesn't block port 80.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 28th January 2009, 00:03
selectoe selectoe is offline
Junior Member
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Allen15 View Post
If you can't browse by IP address externally, it really sounds more like an Apache configuration problem, where you haven't set up proper permissions in Apache to serve those pages to the world at large, or you have some firewall configuration that is rejecting requests from anything outside of your local network.
Thanks guys, it is likely to be an apache config problem I think. I have always had trouble configuring apache properly. I have switched off all firewalls and it still happens, also, ISP is not blocking port 80. I have a static IP address, so it is easy to remember the ip address, so I dont mind that.

What would be a typical apache configuration to allow this to happen?
Reply With Quote
  #6  
Old 28th January 2009, 18:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What are the outputs of
Code:
netstat -tap
and
Code:
iptables -L
? Any errors in Apache's error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 2nd February 2009, 01:23
selectoe selectoe is offline
Junior Member
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

richard@myserver:/$ sudo netstat -tap
[sudo] password for richard:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:imaps *:* LISTEN 5 013/dovecot
tcp 0 0 *op3s *:* LISTEN 5 013/dovecot
tcp 0 0 *:mysql *:* LISTEN 4 745/mysqld
tcp 0 0 localhost:submission *:* LISTEN 4 995/sendmail: MTA:
tcp 0 0 *:netbios-ssn *:* LISTEN 4 896/smbd
tcp 0 0 localhost:bacula-dir *:* LISTEN 5 127/bacula-dir
tcp 0 0 localhost:bacula-fd *:* LISTEN 5 111/bacula-fd
tcp 0 0 *op3 *:* LISTEN 5 013/dovecot
tcp 0 0 localhost:bacula-sd *:* LISTEN 5 082/bacula-sd
tcp 0 0 *:imap2 *:* LISTEN 5 013/dovecot
tcp 0 0 *:www *:* LISTEN 5 103/apache2
tcp 0 0 *:ftp *:* LISTEN 5 041/proftpd: (acce
tcp 0 0 192.168.0.159:domain *:* LISTEN 4 444/named
tcp 0 0 localhost:domain *:* LISTEN 4 444/named
tcp 0 0 localhostostgresql *:* LISTEN 4 852/postgres
tcp 0 0 localhost:smtp *:* LISTEN 4 995/sendmail: MTA:
tcp 0 0 localhost:953 *:* LISTEN 4 444/named
tcp 0 0 *:microsoft-ds *:* LISTEN 4 896/smbd
tcp 1 0 192.168.0.159:34269 192.168.0.:microsoft-ds CLOSE_WAIT -
tcp6 0 0 *:domain *:* LISTEN 4 444/named
tcp6 0 0 *:ssh *:* LISTEN 4 493/sshd
tcp6 0 0 ip6-localhost:953 *:* LISTEN 4 444/named
tcp6 0 0 ::ffff:192.168.0.15:ssh ::ffff:192.168.0.:53993 ESTABLISHED1 0194/sshd: richard



and::::::::::::::::






richard@myserver:/$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination



Thanks,
Richard.
Reply With Quote
  #8  
Old 2nd February 2009, 12:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Looks ok,so my last guess is that it has something to do with your router's firewall...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 20:58
MaxClients set to appropriate level, but ISPconfig is crashing from it (I think) bpmee Server Operation 6 11th January 2007 19:29
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
mod_mono apache 2.2 ColdDoT Server Operation 5 23rd May 2006 02:58
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45


All times are GMT +2. The time now is 18:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.