summaryrefslogtreecommitdiff
path: root/playbooks.d/webserver-nginx/share
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-04-26 10:16:31 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-04-26 10:16:31 +0200
commit4602858936ba085829ada41ee169e033b3e4337f (patch)
tree6abf56d597535cd1e0f25e2cd9edc372f1e7f472 /playbooks.d/webserver-nginx/share
parente177232fb815a0ce4d4c9f9894f76c038f819302 (diff)
Update fedi.tyil.nl nginx config for Misskey
Diffstat (limited to 'playbooks.d/webserver-nginx/share')
-rw-r--r--playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi52
1 files changed, 7 insertions, 45 deletions
diff --git a/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi b/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi
index 8d4930e..29003bb 100644
--- a/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi
+++ b/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi
@@ -1,6 +1,6 @@
server {
- listen 443 ssl http2; # managed by Certbot
- listen [::]:443 ssl http2; # managed by Certbot
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
server_name fedi.tyil.nl;
@@ -12,51 +12,13 @@ server {
include mime.types;
root /var/www/nl.tyil.fedi;
- index index.php;
-
- autoindex off;
- fastcgi_param HTTPS on;
- client_max_body_size 10m;
- client_body_buffer_size 128k;
location / {
- try_files $uri /index.php?pagename=$uri&$args;
- }
-
- location ^~ /.well-known/ {
- allow all;
- rewrite ^ /index.php?pagename=$uri;
- }
-
- location ~* \.(jpg|jpeg|gif|png|ico|css|js|htm|html|ttf|woff|svg)$ {
- expires 30d;
- try_files $uri /index.php?pagename=$uri&$args;
- }
-
- location ~* \.php$ {
- try_files $uri =404;
-
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
-
- fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
-
- include /etc/nginx/snippets.d/fcgi.conf;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-
- fastcgi_buffers 16 16k;
- fastcgi_buffer_size 32k;
- }
-
- location ~* \.(tpl|md|tgz|log|out)$ {
- deny all;
- }
-
- location ~ /\. {
- deny all;
- }
+ proxy_pass http://127.0.0.1:3000;
- location ^~ /bin {
- deny all;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto https;
}
}