LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2005, 02:29 PM   #1
cjkeeme
LQ Newbie
 
Registered: Mar 2005
Posts: 10

Rep: Reputation: 0
Web Server denying access.


I have a web server setup and I am able to browse the pages on the server itself, but on any other computer I get "Access Forbidden".

I have checked all the permissions in all the directories that the web page file are in and everything checks out just fine. I'm running SuSE 9.2 with the lastest stable release of Apache.

What am I missing?

Thanks.


This is the error:
Access forbidden!


You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.


If you think this is a server error, please contact the webmaster.


Error 403

egress.domain.com
Sun May 15 00:34:11 2005
Apache/2.0.50 (Linux/SUSE)

Last edited by cjkeeme; 05-15-2005 at 02:31 PM.
 
Old 05-15-2005, 03:01 PM   #2
dws160468
LQ Newbie
 
Registered: Mar 2004
Location: Australia
Distribution: Arch, Slackware, Debian, Mandrake, RedHat, Centos
Posts: 5

Rep: Reputation: 0
Are you trying to browse from the Apache DocumentRoot?

You need to find the appropriate conf file for Apache and it may differ depending on which Apache you are using (1.3+ or 2) and your distro. Generally the conf will be in /etc/apache, /etc/apache2 or /etc/httpd. I don't use SUSE so can't be more specific. Within that directory look for httpd.conf and its friends (*.conf). You want to check these files for DocumentRoot and ensure it's set to where your site files are. A common default is /var/www.

Next ensure /var/www (or wherever your document root is) is readable by the apache user. Also in the conf file will be the control section for the document root (the <Directory....> directive). Find it and ensure the lines
Order allow,deny
allow from all
appear.

Here's an example from mine, which in my case is in the file /etc/apache2/sites-enabled/000-default:

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

So in my case, surfing to http://mycomputer from any other computer will, by default, take me to the /var/www directory. So I need to ensure the directory is readable: chmod -R +r /var/www. Ensure that the DocumentRoot, /var/www (in this example - yours of course may vary) contains something for Apache to serve. If there is no index.html there already, put one there:
echo "Hello!" > /var/www/index.html

Now hopefully surfing to http://localhost from the server will give results, as will surfing from other computers.

Note that other factors may mean the above does not work in your setup, for example, you may be using virtual hosts in Apache instead.
 
Old 05-15-2005, 03:07 PM   #3
mike33
Member
 
Registered: Jul 2004
Location: Houston Tx
Distribution: kubuntu, Debian, Suse 10.2
Posts: 31

Rep: Reputation: 15
Is there a file called index.html in the server root directory (this should be the directory /usr/local/apache2/htdocs or /some/path/apache2/htdocs)?
If there is and the permissions are correct then the problem most likely is with the server configuration; the configuration file is called /some/path/apache2/conf/httpd.conf;make a backup copy of this file before you try changing it;restart the server after you change its configuration, say by the command /some/path/apache2/bin/apachectl2 restart.
 
Old 05-15-2005, 04:26 PM   #4
cjkeeme
LQ Newbie
 
Registered: Mar 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Okay, everything is just fine when I type 'localhost' in from the browser on the server, but when I ever I try to access from another computer I'm still geting 'object not found' error.
 
Old 05-15-2005, 04:38 PM   #5
cjkeeme
LQ Newbie
 
Registered: Mar 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Got it! Thanks all.
 
  


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
[IPTABLES] open ext access to web server on GW server kozaki Linux - Networking 3 08-27-2005 05:11 PM
Access internal web server by name LoRd Of XAoS Linux - Software 2 07-02-2004 03:56 PM
Denying access to SSH but allow access to FTP nemesisza Linux - Security 5 03-14-2004 10:25 PM
denying pop access remotely slack66 Linux - Security 1 01-28-2004 06:18 PM
Can't access Linux web server web pages from LAN client jaydave Linux - Networking 4 03-16-2003 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration