LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-11-2004, 01:51 PM   #1
silmaril8n
Member
 
Registered: May 2004
Location: Vancouver, WA
Distribution: Mint, Debian, Slackware
Posts: 123

Rep: Reputation: 15
Apache config


How do you configure apache to allow access from inside and outside a network? When I access it internally (via IP address) is tries to load the public IP which isn't a local address. The only way that I can get to my own site from home is to connect to a public proxy and come back in to my network, which is a pain because every proxy I try is completely unreliable.
 
Old 11-11-2004, 02:15 PM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Under /?/apache/httpd.conf you find a line;
#Port: port to whidh the stand alone server llistens to
insert Port 80 which is the standard.
 
Old 11-11-2004, 02:58 PM   #3
silmaril8n
Member
 
Registered: May 2004
Location: Vancouver, WA
Distribution: Mint, Debian, Slackware
Posts: 123

Original Poster
Rep: Reputation: 15
I already have that set to listen on port 8080 because my ISP blocks > 1024 (unless I pay them $10 per month).

I think that the problem has to do with the ServerName being set to my public IP address.

When I connect to the machine via the local IP (http://10.50.0.xxx:8080/~user) then the address is automatically switched to the public IP address which isn't accessible from inside my network.
 
Old 11-11-2004, 03:12 PM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Have you setup name resolution in /etc/hosts? It should not be necessary to specify the port for http connections as it should respond to requests on port 80 which are then sent to the specified DocumentRoot. For example on my server if I use either the IP address or server name I am sent to /var/www/index.htm. If I try a link on the internet to this address I cannot because I am using the same interface. This sounds like either a DocumentRoot problem or a firewall problem.
 
Old 11-11-2004, 03:24 PM   #5
silmaril8n
Member
 
Registered: May 2004
Location: Vancouver, WA
Distribution: Mint, Debian, Slackware
Posts: 123

Original Poster
Rep: Reputation: 15
Yes I have the server added to the /etc/hosts file.

I specify the port because it's not on the default 80. The server is running on an alternate http port 8080 and my browser doesn't check that. I think I may have at least narrowed down the problem.

When I point my local browser to ('arwen' being the name of the host):
http://arwen:8080/index.html (Works)
http://arwen:8080/~user (Tries to use the ServerName which a public IP)

From an outside connection I can use my public IP and access both the DocumentRoot fine and also the user directories.
 
Old 11-11-2004, 03:43 PM   #6
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Try setting "UseCanonicalName" to "Off"
 
Old 11-11-2004, 03:49 PM   #7
silmaril8n
Member
 
Registered: May 2004
Location: Vancouver, WA
Distribution: Mint, Debian, Slackware
Posts: 123

Original Poster
Rep: Reputation: 15
Seems like that would work but I get the same results. This only happens when I append the ~user but it is still trying to use the public IP (ServerName).
 
Old 11-11-2004, 03:58 PM   #8
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Apache 1 or 2?
Does it happen if you add the trailing slash , eg http://arwen:8080/~user/ ?
 
Old 11-11-2004, 04:02 PM   #9
silmaril8n
Member
 
Registered: May 2004
Location: Vancouver, WA
Distribution: Mint, Debian, Slackware
Posts: 123

Original Poster
Rep: Reputation: 15
Apache 1.3.33

Yeah it responds the same way with or without the trailing /
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache config doralsoral Linux - Software 1 11-04-2005 09:01 PM
apache config xpace Linux - Networking 22 08-26-2005 03:36 AM
Apache Config riluve Linux - Software 1 02-14-2005 02:42 PM
apache config. drkfir5 Linux - Software 9 10-25-2004 02:05 AM
Where is the config file for apache linuxmandrake Linux - Software 2 09-15-2004 05:35 PM


All times are GMT -5. The time now is 01:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration