LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Apache 403 Permissions (https://www.linuxquestions.org/questions/linux-networking-3/apache-403-permissions-219894/)

Boffy 08-19-2004 07:01 PM

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>


david_ross 08-20-2004 01:42 PM

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?

Boffy 08-21-2004 11:37 AM

Owner - Can View and Modify
Group - Can View
Others - Can View

User: apache
Group: apache

and yes there is a index.html.

david_ross 08-21-2004 11:51 AM

You will need to have the execute bit set on the directories as well.

Boffy 08-21-2004 12:00 PM

How do i go about doing that?

david_ross 08-21-2004 12:03 PM

Try:
chmod 755 /home/server
chmod 644 /home/server/index.html
chown -R apache /home/server

Boffy 08-21-2004 12:05 PM

no luck, any other ideas?

david_ross 08-21-2004 12:13 PM

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.

Boffy 08-21-2004 12:25 PM

Its alivveeee. I don't know what that did but it worked. Thanks a bunch. :-)

david_ross 08-21-2004 12:36 PM

The default order rule needed to be set to allow.


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