Author |
|
jakej1978
Joined: 26 Feb 2016 Posts: 5 Location: Volcano, HI
|
Posted: Fri 26 Feb '16 9:12 Post subject: 403 Forbidden |
|
|
Host: Ubuntu 14.04.4 LTS
Apache: 2.4.7
PHP: 5.5.9
Error log: [Fri Feb 26 07:10:50.415665 2016] [access_compat:error] [pid 22291] [client 76.173.70.4:55127] AH01797: client denied by server configuration: /var/www/index.php
URL tried to access: http://madmanmarcum.com/index.php
Contents of /var/www:
db1:/var/log/apache2# cd /var/www
db1:/var/www# ls -al
total 3888K
drwxr-xr-x 5 www-data www-data 4096 Feb 25 07:56 ./
drwxr-xr-x 13 root root 4096 Jan 30 20:33 ../
drwxr-xr-x 2 www-data www-data 4096 Feb 25 07:44 coinvault.co/
-rw-r--r-- 1 www-data www-data 5 Feb 25 07:51 index.html
drwxr-xr-x 18 www-data www-data 4096 Feb 25 23:48 madmanmarcum.com/
drwxr-xr-x 2 www-data www-data 4096 Feb 24 04:35 phpbb/
-rw-r--r-- 1 www-data www-data 3954593 Feb 18 17:11 phpBB-3.1.8.zip
apachectl -S
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: MODPERL2
User: name="www-data" id=33
Group: name="www-data" id=33
Virtualhost file:
<VirtualHost *:80>
ServerName madmanmarcum.com
ServerAlias www.madmanmarcum.com
ServerAdmin mike@madmanmarcum.com
DocumentRoot /var/www/madmanmarcum.com
ScriptAlias /cgi-bin/ /var/www/html/cgi-bin
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
<Directory /var/www/madmanmarcum.com>
Options All MultiViews
AllowOverride none
Require All granted
Allow from all
</Directory>
</VirtualHost>
What have I done wrong?
Forbidden
You don't have permission to access / on this server.
Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 mod_perl/2.0.8 Perl/v5.18.2 Server at madmanmarcum.com Port 80 |
|
Back to top |
|
jakej1978
Joined: 26 Feb 2016 Posts: 5 Location: Volcano, HI
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 26 Feb '16 10:52 Post subject: |
|
|
Allow from all is no longer an option. Do not mix 2.2 config with the new 2.4 style ( Require).
I wonder why apachectl -S did not barf about it. |
|
Back to top |
|
jakej1978
Joined: 26 Feb 2016 Posts: 5 Location: Volcano, HI
|
Posted: Sun 28 Feb '16 3:19 Post subject: |
|
|
James Blond wrote: | Allow from all is no longer an option. Do not mix 2.2 config with the new 2.4 style ( Require).
I wonder why apachectl -S did not barf about it. |
Did not fix. Removed and restarted.
apachectl -S
http://termbin.com/ikt4
Broken vhost with 403 error
http://termbin.com/eobp |
|
Back to top |
|
jakej1978
Joined: 26 Feb 2016 Posts: 5 Location: Volcano, HI
|
Posted: Sun 28 Feb '16 8:10 Post subject: |
|
|
Ok, I made some changes and got it enabled using a2ensite. Here's what I got now:
db1:/etc/apache2/sites-enabled# apachectl -M | nc termbin.com 9999
http://termbin.com/atv2
db1:/etc/apache2# cat apache2.conf | nc termbin.com 9999
http://termbin.com/y5v5
db1:/etc/apache2# cat apache2.conf | nc termbin.com 9999
http://termbin.com/93gl
db1:/etc/apache2/sites-enabled# cat madmanmarcum.com.conf | nc termbin.com 9999
http://termbin.com/8dq9
Permissions are gid,oid www-data for all of /var/www, including my vhost. index.php is 644. Everything has the right permissions.
Error in log is now
AH01797: client denied by server configuration: /var/www/madmanmarcum.com/ |
|
Back to top |
|
jakej1978
Joined: 26 Feb 2016 Posts: 5 Location: Volcano, HI
|
Posted: Sun 28 Feb '16 8:18 Post subject: |
|
|
It was mod_compat.
Disabled and all is well |
|
Back to top |
|