mekici server {
listen 80;
listen [::]:80;
root /var/www/flarum/public;
index index.php index.html index.htm;
server_name websiteniz.com www.websiteniz.com;
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
include /var/www/flarum/.nginx.conf;
}
Yukarıdaki kodları tamamen silip aşağıdaki kodları mı eklemeliyim?
mekici server {
listen 80;
server_name flarumtr.com www.flarumtr.com;
return 301 https://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;
add_header Strict-Transport-Security “max-age=31536000; includeSubDomains” always;
return 301 https://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;
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;
}