31 lines
644 B
Plaintext
31 lines
644 B
Plaintext
# redirect http -> https
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name fosslinux.me;
|
|
return 301 https://fosslinux.me$request_uri;
|
|
}
|
|
|
|
# redirect www -> nothing
|
|
server {
|
|
server_name www.fosslinux.me;
|
|
return 301 https://fosslinux.me$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 default_server ssl;
|
|
listen [::]:443 default_server ssl;
|
|
|
|
server_name fosslinux.me;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
|
|
root /home/fosslinux/public_html;
|
|
index index.php index.html index.htm;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
include snippets/php.conf;
|
|
}
|