Closed pacino01 closed 11 months ago
Delete everything in /etc/nginx/sites-enabled/default and paste:
server { listen 80; listen [::]:80; listen 443; listen [::]:443; root /var/www/eckmar/public; index index.php index.html index.htm index.nginx-debian.html; server_name domain.com; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ .php$ { try_files $uri =404; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/run/php/php7.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
https://github.com/eckmarcommunity/eckmar/blob/master/INSTALLATION.md#nginx-config
Delete everything in /etc/nginx/sites-enabled/default and paste:
server { listen 80; listen [::]:80; listen 443; listen [::]:443; root /var/www/eckmar/public; index index.php index.html index.htm index.nginx-debian.html; server_name domain.com; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ .php$ { try_files $uri =404; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/run/php/php7.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
https://github.com/eckmarcommunity/eckmar/blob/master/INSTALLATION.md#nginx-config
I pasted the settings into: nano /etc/nginx/sites-available/default and after sudo nginx -t I got this response: nginx: [emerg] "server_name" directive is not allowed here in /etc/nginx/sites-enabled/default:60 nginx: configuration file /etc/nginx/nginx.conf test failed
You need to delete everything in the file default THEN paste. The error you have is on line 60. there are only 14 lines to paste
Hello, I edited the config and after I want to check Nginx with: sudo nginx -t I got this output: nginx: [emerg] "server_name" directive is not allowed here in /etc/nginx/sites-enabled/default:60 nginx: configuration file /etc/nginx/nginx.conf test failed
After I installed the file I have a problem to give them permission, maybe its a problem because of nginx config is not working correctly?