Fix indentation inconsistency

This commit is contained in:
root 2022-07-26 07:37:37 -04:00
parent 76adf78424
commit bf1db93bff
9 changed files with 103 additions and 67 deletions

View File

@ -6,7 +6,7 @@ ssi on;
location / {
rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
error_page 403 /errors/403;
error_page 404 /errors/404;
@ -48,5 +48,32 @@ location /media/ {
## users
location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
return 301 $scheme://$user.vern.cc;
if (!-d /sshfs/home/$user/public_html) {
return 307 https://vern.cc/;
}
subs_filter (<[^>]*\s(href|src)=["']?/) $1u/$user;
autoindex on;
autoindex_exact_size off;
ssi on;
error_log /var/log/nginx/vern.cc-error.log crit;
alias /sshfs/home/$user/public_html;
index index.html index.php index.cgi index.py index.sh index.pl index.lua;
rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
# try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
location ~ \.php$ {
fastcgi_pass 192.168.122.30:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
location ~ (\.cgi|\.py|\.sh|\.pl|\.lua|\/cgi-bin)$ {
gzip off;
fastcgi_pass 192.168.122.30:9001;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
}

9
common/wikiless.conf Normal file
View File

@ -0,0 +1,9 @@
add_header Onion-Location http://wl.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
location / {
proxy_pass http://127.0.0.1:6629/; # The / is important!
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}

View File

@ -1,16 +1,16 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 8448 ssl http2;
listen [::]:8448 ssl http2;
server_name matrix.aryak.ml;
merge_slashes off;
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 8448 ssl http2;
listen [::]:8448 ssl http2;
server_name matrix.aryak.ml;
merge_slashes off;
location /_matrix/ {
proxy_pass http://10.7.0.4:6167$request_uri;
proxy_set_header Host $http_host;
proxy_buffering off;
}
location /_matrix/ {
proxy_pass http://10.7.0.4:6167$request_uri;
proxy_set_header Host $http_host;
proxy_buffering off;
}
ssl_certificate /etc/letsencrypt/live/matrix.aryak.ml/fullchain.pem; # EDIT THIS
ssl_certificate_key /etc/letsencrypt/live/matrix.aryak.ml/privkey.pem; # EDIT THIS

View File

@ -1,27 +1,27 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# For the federation port
listen 8448 ssl http2 default_server;
listen [::]:8448 ssl http2 default_server;
include snippets/lets-encrypt.conf;
# For the federation port
listen 8448 ssl http2 default_server;
listen [::]:8448 ssl http2 default_server;
include snippets/lets-encrypt.conf;
server_name mtrx.vern.cc;
server_name mtrx.vern.cc;
location ~ ^(/_matrix|/_synapse/client) {
# note: do not add a path (even a single /) after the port in `proxy_pass`,
# otherwise nginx will canonicalise the URI and cause signature verification
# errors.
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
location ~ ^(/_matrix|/_synapse/client) {
# note: do not add a path (even a single /) after the port in `proxy_pass`,
# otherwise nginx will canonicalise the URI and cause signature verification
# errors.
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
# Nginx by default only allows file uploads up to 1M in size
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
client_max_body_size 1024M;
}
# Nginx by default only allows file uploads up to 1M in size
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
client_max_body_size 1024M;
}
## well-known
location /.well-known/matrix/support {
add_header Access-Control-Allow-Origin '*' always;
@ -43,17 +43,17 @@ server {
}
server {
server_name dim.vern.cc;
listen 443 ssl;
listen [::]:443 ssl;
server_name dim.vern.cc;
listen 443 ssl;
listen [::]:443 ssl;
root /var/www/matrix;
index index.html;
root /var/www/matrix;
index index.html;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8184;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8184;
}
include snippets/lets-encrypt.conf;
include snippets/lets-encrypt.conf;
}

View File

@ -1,20 +1,20 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 443 ssl http2;
listen [::]:443 ssl http2;
include snippets/lets-encrypt.conf;
include snippets/lets-encrypt.conf;
server_name mau.vern.cc;
server_name mau.vern.cc;
location /_matrix/maubot/v1/logs {
proxy_pass http://localhost:29316;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-For $remote_addr;
}
location /_matrix/maubot {
proxy_pass http://localhost:29316;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /_matrix/maubot/v1/logs {
proxy_pass http://localhost:29316;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-For $remote_addr;
}
location /_matrix/maubot {
proxy_pass http://localhost:29316;
proxy_set_header X-Forwarded-For $remote_addr;
}
}

View File

@ -9,10 +9,10 @@ server {
location / {
root /usr/lib/node_modules/mumble-web/dist;
}
location /vern {
proxy_pass http://localhost:64737;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location /vern {
proxy_pass http://localhost:64737;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}

View File

@ -3,8 +3,6 @@ server {
listen [::]:80;
server_name ~^(?<user>[^.]+)\.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad\.onion;
error_log /var/log/nginx/vern.cc-error.log crit;
include snippets/user.vern.conf;
}
@ -14,7 +12,7 @@ server {
listen [::]:443 ssl http2;
server_name ~^(?<user>[^.]+)\.vern\.cc;
include snippets/lets-encrypt.conf;
error_log /var/log/nginx/vern.cc-error.log crit;
include snippets/user.vern.conf;
}

1
sites-enabled/wikiless.conf Symbolic link
View File

@ -0,0 +1 @@
/etc/nginx/sites-available/wikiless.conf

View File

@ -1,5 +1,6 @@
add_header Onion-Location http://$user.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
error_log /var/log/nginx/vern.cc-error.log crit;
root /sshfs/home/$user/public_html;
index index.html index.php index.cgi index.py index.sh index.pl index.lua;
@ -23,7 +24,7 @@ autoindex_exact_size off;
location / {
rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
autoindex on ;
}
location /media {