Я развернул свой проект Laravel 10 на Ubuntu 22 с помощью Nginx.
Это файл конфигурации моего виртуального хоста Nginx:
Код: Выделить всё
server {
listen 80;
root /var/www/v2-hexagon/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
server_name compro.hexagon.co.id www.compro.hexagon.co.id;
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; }
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/78778028/assets-got-neterr-aborted-404-not-found-in-route-on-laravel-10-with-ngin[/url]