I ran the necessary command, I could not get a result, I encountered the error mentioned while entering.
My nginx settings;
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.xxxx.com;
set $base /var/www/xxxx.com;
root $base/public;
# SSL
ssl_certificate /etc/letsencrypt/live/xxx.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xxx.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/xxx.com/chain.pem;
# index.php
index index.php index.html index.htm;
# index.php fallback
location / {
try_files $uri $uri/ /index.php?$query_string;
}
gzip_vary on;
gzip_comp_level 2;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(css|js|ico|gif|jpeg|jpg|webp|png|svg|eot|otf|woff|woff2|ttf|ogg)$ {
expires max;
log_not_found off;
add_header Cache-Control "public";
add_header Pragma "public";
}
# Gizli dosyaların guvenligi
location ~ /\. {
deny all;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
log_not_found off;
access_log off;
allow all;
}
include /var/www/xxx.com/.nginx.conf;
}