I know it is a common problem, and it is mainly a matter of permissions to the user www-data
, but following this guide I got the classic error:
403 forbidden
You don't have permission to access /web on this server.
I was not able to find a solution online, despite the huge amount of people facing the same issue. Sorry! :)
This is my 000-default.conf
file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/tom/Dropbox/web
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/tom/Dropbox/web>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/tom/Dropbox/web/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog home/tom/Dropbox/web/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
and of course, the folder in which I tried to configure my local website is in ~/Dropbox/web
.
Finally, these are the current permissions
drwxrwxrwx 8 tom tom 4096 mars 26 09:57 Dropbox
drwxrwxrwx 3 tom tom 4096 mars 26 11:47 web
Thanks