53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
# redirect http -> https
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name aussies.space;
|
|
return 301 https://aussies.space$request_uri;
|
|
}
|
|
|
|
# redirect www -> nothing
|
|
server {
|
|
server_name www.aussies.space;
|
|
return 301 https://aussies.space$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 default_server ssl;
|
|
listen [::]:443 default_server ssl;
|
|
|
|
server_name aussies.space;
|
|
ssl_certificate **path has been removed**; # managed by Certbot
|
|
ssl_certificate_key **path has been removed**; # managed by Certbot
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
|
|
root /var/www/aussies.space;
|
|
index index.php index.html index.htm;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location ~^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
|
|
alias /home/$user/public_html$user_uri;
|
|
index index.html index.php index.htm;
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
location ~ [^/]\.php(/|$) {
|
|
include snippets/php_common;
|
|
}
|
|
autoindex on;
|
|
}
|
|
|
|
# location /fosslinux_weechat {
|
|
# proxy_pass http://localhost:3375/weechat; # Change the port to your relay's
|
|
# proxy_http_version 1.1;
|
|
# proxy_set_header Upgrade $http_upgrade; # These two lines ensure that the
|
|
# proxy_set_header Connection "Upgrade"; # a WebSocket is used
|
|
# proxy_read_timeout 604800; # Prevent idle disconnects
|
|
# proxy_set_header X-Real-IP $remote_addr; # Let WeeChat see the client's IP
|
|
# limit_req zone=weechat burst=1 nodelay; # Brute force prevention
|
|
# }
|
|
|
|
include snippets/php.conf;
|
|
}
|