i'm trying to set up for the first time a nginx server to deploy a laravel application.
I've done each step required, installing php, mysql, composer ecc
Than i create a config file as below :
server {
listen 80;
server_name 142.93.111.117;
root /var/www/colosseo60/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;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico {return 204; access_log off; log_not_found of
f; }
location = /robots.txt { access_log off; log_not_found of
f; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_s
cript_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
then i create a copy of it also in the directory sites-enabled
but when i try to test if my nginx server is working properly(sudo nginx -t
) i get this error :
nginx: [emerg] invalid number of arguments in "log_not_found" directive in /etc/nginx/sites-enabled/colosseo60:19
nginx: configuration file /etc/nginx/nginx.conf test failed
Now it's about 4 hours that i'm trying to find a solution for this error but it seems that i'm not able to find any looking around of the web.
Is there anybody that can help me with this matter?
Sorry in advance if somebody can think this is a easy question but i'm a perfect noob with it and i'm getting crazy.
Thank you so much