2

after installing and starting apache2 i can't open the website and got the error "Forbidden You don't have permission to access / on this server." I tried some different options in the httpd.conf, but nothing helped me solving this problem.

All permissions for every directory are "drwxr-xr-x". The directory /var/www contains a file names index.html with the same permissions. Please do not wonder, the time in the errorlog is not correctly. I have no idea what the problem is, i hope someone can help me.

my httpd.conf:

ServerRoot "/etc/apache2"
Listen 80
<IfModule !mpm_netware_module>
    User daemon
    Group daemon
</IfModule>
    ServerAdmin you@example.com
    DocumentRoot "/var/www"
<Directory />
        Options FollowSymLinks
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>
    <Directory "/var/www">
        Options Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
ErrorLog /var/apache2/logs/error_log

LogLevel warn


<Directory "/usr/share/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
    TypesConfig /etc/apache2/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
</IfModule>

my error_log:


[Sat Jan 01 00:50:26 2000] [notice] caught SIGTERM, shutting down
[Sat Jan 01 00:50:33 2000] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 01 00:50:34 2000] [notice] Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.8j configured -- resuming normal operations
[Sat Jan 01 00:50:36 2000] [error] [client 192.168.1.44] (13)Permission denied: access to / denied
[Sat Jan 01 00:50:37 2000] [error] [client 192.168.1.44] (13)Permission denied: access to / denied
[Sat Jan 01 00:50:37 2000] [error] [client 192.168.1.44] (13)Permission denied: access to / denied
[Sat Jan 01 00:50:37 2000] [error] [client 192.168.1.44] (13)Permission denied: access to / denied
[Sat Jan 01 00:50:38 2000] [error] [client 192.168.1.44] (13)Permission denied: access to / denied
[Sat Jan 01 00:50:38 2000] [error] [client 192.168.1.44] (13)Permission denied: access to / denied

1
  • Did any of these answers help?
    – pjmorse
    Feb 2, 2011 at 14:53

2 Answers 2

1

Remove:

Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
2
  • i tried it with follow lines: Options FollowSymLinks AllowOverride None Order Allow, Deny Allow from All but this have no effect. Do you mean it works, if i remove it completly? I will try it
    – user42817
    May 11, 2010 at 20:58
  • His Apache config is not the problem. I tested that config on a VM and it works fine without any issues.
    – Rilindo
    Sep 6, 2011 at 2:25
1

Have you checked the physical filesystem to ensure that /var and /var/www have permissions open enough for the apache user to read/access files?

$ ls -ld /var /var/www
drwxr-xr-x. 23 root root 4096 Jun 27  2010 /var
drwxr-xr-x.  6 root root 4096 Oct 27 07:29 /var/www

Make sure that's kosher.

1
  • I went and replicated his Apache configs in a spare VM. From what I can tell, his configs are fine, so this very likely points to permissions.
    – Rilindo
    Sep 6, 2011 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.