mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
fixup after testing to get a minimalistic working config
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
server {
|
||||
server_name hub.example.org;
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name hub.example.org;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name hub.example.org;
|
||||
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
|
||||
## Quic and HTTP3 Requires Nginx >= 1.25.0
|
||||
## https://nginx.org/en/docs/quic.html
|
||||
# listen [::]:443 quic;
|
||||
# listen 443 quic;
|
||||
# listen [::]:443 quic reuseport;
|
||||
# listen 443 quic reuseport;
|
||||
# http3 on;
|
||||
# server_name hub.example.org;
|
||||
|
||||
## Headers for Quic and HTTP3
|
||||
# add_header alt-svc 'h3=":443"; ma=86400' always;
|
||||
|
||||
@@ -29,31 +32,20 @@ server {
|
||||
## Basic folder and files settings
|
||||
root /var/www/hub.example.org;
|
||||
index index.php;
|
||||
charset utf-8;
|
||||
|
||||
## Access and Error logs
|
||||
access_log off;
|
||||
# reduce I/0 with buffer=10m flush=5m;
|
||||
access_log /var/log/nginx/hub.example.org.log quic buffer=10m flush=5m;
|
||||
error_log /var/log/nginx/hub.example.org.log error;
|
||||
|
||||
## Log to systemd log
|
||||
# access_log syslog:server=unix:/dev/log quic;
|
||||
error_log syslog:server=unix:/dev/log error;
|
||||
|
||||
client_max_body_size 20m; # How big files are users allowed to upload
|
||||
## How big files are users allowed to upload
|
||||
client_max_body_size 20m;
|
||||
client_body_buffer_size 128k;
|
||||
|
||||
include mime.types;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?q=$uri;
|
||||
try_files $uri /index.php?q=$uri&$args;
|
||||
}
|
||||
|
||||
location ^~ /.well-known/ {
|
||||
allow all;
|
||||
access_log off;
|
||||
try_files $uri $uri/ /index.php?q=$uri;
|
||||
try_files $uri /index.php?q=$uri&$args;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|gif|png|ico|css|js|htm|html|map|ttf|woff|woff2|svg)$ {
|
||||
@@ -70,7 +62,12 @@ server {
|
||||
fastcgi_param HTTPS $https;
|
||||
}
|
||||
|
||||
# block hidden files, extensions, and directories
|
||||
location ~* \.(bak|tpl|md|tgz|log|out)$ { deny all; access_log off;}
|
||||
location ~* /(?:\.git|store|util)(?:/|$) { deny all; access_log off;}
|
||||
## block hidden files, extensions, and directories
|
||||
location ~* \.(bak|tpl|md|tgz|log|out)$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* /(?:\.git|store|util)(?:/|$) {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user