My environment: Ubuntu 10.10 Desktop Edition
So I am trying to access a file through my localhost and Apache is giving me a 403 error.
On /etc/apache2/apache2.conf
, I've added this line :
# wan27 hostel
Include "/home/francoisrv/Ubuntu One/hostel/apache2.conf"
The contents of /home/francoisrv/Ubuntu One/hostel/apache2.conf
:
Alias /hostel "/home/francoisrv/Ubuntu One/hostel/"
<Directory "/home/francoisrv/Ubuntu One/hostel/">
DirectoryIndex index.php
Options +FollowSymLinks
AllowOverride All
order deny,allow
deny from all
allow from 127.0.0.0/255.0.0.0 ::1/128
# allow from all
<IfModule mod_php5.c>
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_value include_path .
</IfModule>
</Directory>
Then make sure folder is accessible to www-data, on my terminal:
chown -R www-data "/home/francoisrv/Ubuntu One/hostel"
Then restart Apache, Apache does not complain about some misconfiguration
/etc/init.d/apache2 restart
* Restarting web server apache2 ... waiting [ OK ]
Then, on Chrome, entering address http://localhost/hostel/checkin.php, I get:
403
Forbidden
You don't have permission to access /hostel/checkin.php on this server.
Apache/2.2.16 (Ubuntu) Server at localhost Port 80
The contents of /home/francoisrv/Ubuntu One/hostel/checkin.php
:
hola
What am I missing?