LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 03-14-2008, 07:13 AM   #1
stinkytofu
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
Accessing Apache from different computer


I have a problem accessing Apache from a computer other than my own on my home LAN. When I am using my own computer, I can access the Apache site by typing http://localhost/. However, when I try to access it from a computer other than my own, I receive a 404 Not Found error.

I have tried adding the following lines to the top of the apache2.conf file:

<Directory "/var/www">
Order Allow, Deny
Allow from all
</Directory>

But am still receiving the same error message. Not sure what I am doing wrong. I also have some virtual servers setup in the /etc/apache2/sites-enabled/default file as follows:

NameVirtualHost 127.0.0.1

<VirtualHost localhost>
ServerName localhost
ServerAdmin admin@test.com
DocumentRoot /var/www/
ErrorLog /var/log/apache2/error.log
</VirtualHost>

<VirtualHost sg>
ServerName sg
ServerAdmin admin@test.com
DocumentRoot /var/www/sg/
</VirtualHost>

Is there something in this file that may be causing the problem?

I am running Apache on Ubuntu by the way.

Thanks for your help!
 
Old 03-14-2008, 07:18 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Are you trying to reach the server by using localhost as the address as well? If so, that's the problem, localhost is limited to the host you are currently on.
 
Old 03-17-2008, 12:42 AM   #3
stinkytofu
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
No, I am trying to access the server using its assigned IP address, not with localhost.
 
Old 03-17-2008, 01:25 AM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
It's usually NameVirtualHost *:80, not NameVirtualHost 127.0.0.1

Have a look at the name based virtual hosts docs on the Apache siteand the virtual hosts examples for more info. If that doesn't help, can you post some more of your config file? Specifically directory locations, ports and other virtual hosts (but not the file/mime types).
 
Old 03-20-2008, 05:48 AM   #5
stinkytofu
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Re: Accessing Apache from different computer

Thanks Gilead, those links helped!
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing computer across networks Madd the Sane Linux - Networking 3 10-26-2007 10:54 PM
Accessing remote computer adilturbo Linux - Networking 4 06-29-2006 04:32 AM
accessing my router from a different computer true_atlantis Linux - Networking 4 12-24-2005 10:13 PM
Accessing a computer behind NAT Menestrel Linux - Networking 1 01-16-2005 06:07 AM
accessing my computer remotely paul44 Linux - Newbie 3 05-06-2004 08:17 AM


All times are GMT -5. The time now is 12:14 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
Open Source Consulting | Domain Registration