S
S
Sergey Burduzha2021-11-20 14:53:32
Nginx
Sergey Burduzha, 2021-11-20 14:53:32

Why do I see nginx instead of laravel?

Good afternoon.
I work locally.
Already finished one study project and had no problems with the server.
oop.local
00yLmJM.png

server {
        listen 80;
        listen [::]:80;

        root /var/www/laravel_projects/oop.local/public;
        index index.html index.htm index.nginx-debian.html;
        error_log  /var/log/nginx/error.log;
        access_log  /var/log/nginx/access.log;

        server_name oop.local www.oop.local;

        location / {
                index index.php;
                try_files $uri $uri/ /index.php?$args;
        }

        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                if (!-f $document_root$fastcgi_script_name) {return 404;}
                fastcgi_param HTTP_PROXY "";
                include fastcgi_params;
                fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
        }

        location ~ /\.ht {
                deny all;
        }
}


/etc/hosts
DtvA70I.png

And a new project

server {
        listen 80;
        listen [::]:80;

        root /var/www/laravel_projects/lv-study.local/public;
        index index.html index.htm index.nginx-debian.html;
        error_log  /var/log/nginx/error.log;
        access_log  /var/log/nginx/access.log;

        server_name lv-study.local www.lv-study.local;

        location / {
                index index.php;
                try_files $uri $uri/ /index.php?$args;
        }

        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                if (!-f $document_root$fastcgi_script_name) {return 404;}
                fastcgi_param HTTP_PROXY "";
                include fastcgi_params;
                fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
        }

        location ~ /\.ht {
                deny all;
        }
}


What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Burduzha, 2021-11-20
@serii81

I did this
sudo chown -R serii:www-data laravel_projects
sudo chmod -R 775 laravel_projects

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question