403 Forbidden - Nginx

br flag

I set my nginx.conf to my /home because PHPStorm was not editing a file inside /usr/share/nginx/html. However, I have a new problem. When I access a URL via folder it returns a 403 Forbidden But when I access a specific file in the URL, Nginx manages to run the code in PHP. Is there any way I can resolve this? When nginx.conf was in the previous configuration, this was not the case. This is the current content of my nginx.conf:

worker_processes  1;

events {
    worker_connections  1024;

http {
    include       mime.types;
    default_type  application/octet-stream;

    types_hash_max_size 4096;

    server {
        listen       80;
        server_name  localhost;

        location / {
            root   /home/erierfcasi/www/;
            index  index.php index.html index.htm;
            autoindex on;
            autoindex_exact_size on;

        location ~* \.php$ {
            fastcgi_index  index.php;
            include        /etc/nginx/fastcgi_params;
              fastcgi_param  SCRIPT_FILENAME  /home/erierfcasi/www/$fastcgi_script_name;


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.