BatuhanBakay o zaman aşağıdaki gibi yap. Ala adını ve diğer kısımları kendine göre değiştir.
server {
listen 80;
server_name flarumtr.com www.flarumtr.com;
return 301 https://www.flarumtr.com$request_uri;
}
server {
listen 443 ssl;
server_name flarumtr.com;
ssl_certificate /etc/letsencrypt/live/flarumtr.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/flarumtr.com/privkey.pem;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
return 301 https://www.flarumtr.com$request_uri;
}
server {
listen 443 ssl;
server_name www.flarumtr.com;
ssl_certificate /etc/letsencrypt/live/flarumtr.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/flarumtr.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
root /var/www/flarumtr/public;
index index.php index.html index.htm index.nginx-debian.html;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location = /sitemap.xml { try_files $uri $uri/ /index.php?$query_string; }
location ~ /\.ht {deny all;}
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {expires 365d;}
include /var/www/flarumtr/.nginx.conf;
}