Answer the question
In order to leave comments, you need to log in
How to fix error 500 on Laravel+nginx?
Good afternoon, displays an error 500 when going anywhere other than the main page, the error logs are empty.
Before that, it was on Apache, it was fine. Rights to storage 777.
server {
listen 443 ssl;
server_name site.ru;
root /var/www/html/site.ru/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
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_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
keepalive_timeout 60;
ssl_certificate /etc/apache2/ssl/certificate.crt;
ssl_certificate_key /etc/apache2/ssl/private.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "RC4:HIGH:!aNULL:!MD5:!kEDH";
add_header Strict-Transport-Security 'max-age=604800';
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question