Answer the question
In order to leave comments, you need to log in
Why is my page empty?
I pulled the project and configured nginx. But for some reason, when I open the initial page, I open an empty page and there is nothing on it, if I turn php artisan serve
it on, then the link does everything.
My nginx file
server {
listen 80 default_server;
server_name latina.site;
root /home/ruslan/Разработка/latina/admin/public;
index index.html index.php index.htm;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
[email protected]:/etc/nginx/sites-available$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
sudo service nginx reload
127.0.0.1 latina.site
Answer the question
In order to leave comments, you need to log in
php artisan serve is a php webserver, of course it will work, check the nginx logs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question