I have a project on symfony2.8, i use Parrot OS (Debian based), i have already installed PHP7.1 and MariaDB, but when i try to access to website project, i got :
403 Forbidden
There is some logs :
/var/log/nginx/error.log
2018/08/18 19:57:29 [error] 2520#2520: *15 directory index of "/var/www/html/xxxxxx/" is forbidden, client: ::1, server: _, request: "GET /airnjobs/ HTTP/1.1", host: "localhost"
/var/log/nginx/access.log
::1 - - [18/Aug/2018:19:57:29 +0200] "GET /xxxxx/ HTTP/1.1" 403 199 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
Can you help me please :/ i'm stuck !
UPDATE 1 :
Still no access, i chown directory and files and chmod with no results.
This looks like an nginx configuration issue, not a permission problem.
If
/xxxxxis the project directory, the web root of the project should be/xxxxx/web.You log shows that you are trying to list the content of you project directory, when you should only ever be accessing
/xxxxx/web/app_dev.php,/xxxxx/web/app.phpor/xxxxx/web/config.php,so this 403 error is the expected behaviour.
When trying to access the dev environment, your URL should be something like
http://localhost/xxxxx/web/app_dev.php,or
http://xxxxx.local/app_dev.phpif you have a web host configured correctly.The symfony doc has an example of nginx configuration for 2.8:
https://symfony.com/doc/2.8/setup/web_server_configuration.html#nginx
I changed it a bit to fit your case:
This goes into your nginx configuration file, for example:
/etc/nginx/conf.d/xxxxx.confThen you need to add the hostname
xxxxx.localto your/etc/hostsfile: