LinuxQuestions.org
Register a domain and help support LQ
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 08-19-2004, 07:01 PM   #1
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Rep: Reputation: 30
Apache 403 Permissions


OK, when i try to load apache i get
Forbidden

You don't have permission to access / on this server.

unless the DocumentRoot is set to /var/www/html/

Httpd2.conf(without comments):
Code:
ServerRoot /etc/httpd/2.0
PidFile /var/run/httpd.pid
ErrorLog logs/error_log
LogLevel warn
DocumentRoot /home/server

LoadModule access_module	modules/mod_access.so
LoadModule auth_module		modules/mod_auth.so
LoadModule auth_anon_module	modules/mod_auth_anon.so
##LoadModule auth_dbm_module	modules/mod_auth_dbm.so
LoadModule auth_digest_module	modules/mod_auth_digest.so
##LoadModule charset_lite_module	modules/mod_charset_lite.so
##LoadModule case_filter_module	modules/mod_case_filter.so
##LoadModule case_filter_in_module	modules/mod_case_filter_in.so
##LoadModule ext_filter_module	modules/mod_ext_filter.so
LoadModule include_module	modules/mod_include.so
LoadModule log_config_module	modules/mod_log_config.so
LoadModule logio_module		modules/mod_logio.so
LoadModule env_module		modules/mod_env.so
##LoadModule mime_magic_module	modules/mod_mime_magic.so
##LoadModule cern_meta_module	modules/mod_cern_meta.so
LoadModule expires_module	modules/mod_expires.so
LoadModule headers_module	modules/mod_headers.so
LoadModule usertrack_module	modules/mod_usertrack.so
LoadModule setenvif_module	modules/mod_setenvif.so
LoadModule mime_module		modules/mod_mime.so
LoadModule status_module	modules/mod_status.so
LoadModule autoindex_module	modules/mod_autoindex.so
LoadModule asis_module		modules/mod_asis.so
LoadModule info_module		modules/mod_info.so
LoadModule cgi_module		modules/mod_cgi.so
LoadModule vhost_alias_module	modules/mod_vhost_alias.so
LoadModule negotiation_module	modules/mod_negotiation.so
LoadModule dir_module		modules/mod_dir.so
LoadModule imap_module		modules/mod_imap.so
LoadModule actions_module	modules/mod_actions.so
LoadModule userdir_module	modules/mod_userdir.so
LoadModule alias_module		modules/mod_alias.so
LoadModule rewrite_module	modules/mod_rewrite.so

Include /etc/httpd/conf.d/*.conf
Include conf/commonhttpd.conf


<IfDefine APACHEPROXIED>
    Listen 8080
</IfDefine>
<IfDefine !APACHEPROXIED>
    Listen 80
</IfDefine>

<IfDefine PERLPROXIED>
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^proxy:.*  -  [F]
    RewriteRule ^(.*\/perl\/.*)$  http://%{HTTP_HOST}:8200$1 [P]
    RewriteRule ^(.*\/cgi-perl\/.*)$  http://%{HTTP_HOST}:8200$1 [P]
</IfModule>
</IfDefine>

<IfModule mod_log_config.c>
CustomLog logs/access_log combined env=!VLOG
CustomLog "|/usr/sbin/advxsplitlogfile" vhost env=VLOG
</IfModule>

Include conf/vhosts/Vhosts.conf

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 15

<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients         150
MaxRequestsPerChild  0
</IfModule>

<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>
 
Old 08-20-2004, 01:42 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
What are the permissions on /home/server?

Is the directory and files readable by apache?

Do you have an index.html file in that directory?
 
Old 08-21-2004, 11:37 AM   #3
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Original Poster
Rep: Reputation: 30
Owner - Can View and Modify
Group - Can View
Others - Can View

User: apache
Group: apache

and yes there is a index.html.
 
Old 08-21-2004, 11:51 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
You will need to have the execute bit set on the directories as well.
 
Old 08-21-2004, 12:00 PM   #5
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Original Poster
Rep: Reputation: 30
How do i go about doing that?
 
Old 08-21-2004, 12:03 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Try:
chmod 755 /home/server
chmod 644 /home/server/index.html
chown -R apache /home/server
 
Old 08-21-2004, 12:05 PM   #7
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Original Poster
Rep: Reputation: 30
no luck, any other ideas?
 
Old 08-21-2004, 12:13 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Try adding a directory section below the DocumentRoot to your configuration:
Code:
DocumentRoot /home/server
<Directory "/home/server">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
Then restart apache. If that doesn't work then check in your error_log file to see if there is more information there.
 
Old 08-21-2004, 12:25 PM   #9
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Original Poster
Rep: Reputation: 30
Its alivveeee. I don't know what that did but it worked. Thanks a bunch. :-)
 
Old 08-21-2004, 12:36 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
The default order rule needed to be set to allow.
 
  


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: 403 forbidden johnty01 Linux - Networking 5 04-05-2008 03:20 PM
APACHE Problem 2 dirs, identical permissions and security contexts, one gives 403? tones Linux - Software 2 03-13-2005 09:45 AM
Why this 403? - I have set all permissions winslow Linux - Newbie 10 08-11-2004 06:35 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 06:30 AM
Apache 403 Forbidden quozt Linux - Networking 10 02-24-2004 05:59 PM


All times are GMT -5. The time now is 12:59 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration