Stop tracking server-specific nginx and systemd configuration
This commit is contained in:
parent
4dfa7da08b
commit
289c6d5a43
@ -1,82 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 443 ssl;
|
|
||||||
listen [::]:443 ssl;
|
|
||||||
|
|
||||||
server_name wegwichtel.de;
|
|
||||||
|
|
||||||
ssl_certificate /etc/letsencrypt/live/wegwichtel.de/fullchain.pem; # managed by Certbot
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/wegwichtel.de/privkey.pem; # managed by Certbot
|
|
||||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
||||||
|
|
||||||
root /srv/wegwichtel/Wegwichtel/public;
|
|
||||||
index index.html;
|
|
||||||
|
|
||||||
error_log /srv/wegwichtel/logs/error.log warn;
|
|
||||||
|
|
||||||
# Begrenzung des gesamten HTTP-Requests.
|
|
||||||
# Wegen GPX-, Bild- und Audio-Uploads größer als das Node-Einzellimit.
|
|
||||||
client_max_body_size 256m;
|
|
||||||
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
||||||
|
|
||||||
# REST-API an Atlas/Node.js weiterleiten.
|
|
||||||
location ^~ /api/ {
|
|
||||||
proxy_pass http://127.0.0.1:47145;
|
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
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 $scheme;
|
|
||||||
|
|
||||||
proxy_connect_timeout 10s;
|
|
||||||
proxy_send_timeout 120s;
|
|
||||||
proxy_read_timeout 120s;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Nur aktive Medien über Node.js ausliefern.
|
|
||||||
# storage/trash bleibt dadurch vollständig unsichtbar.
|
|
||||||
location ^~ /media/ {
|
|
||||||
proxy_pass http://127.0.0.1:47145;
|
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
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 $scheme;
|
|
||||||
|
|
||||||
proxy_read_timeout 120s;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Statische Anwendung direkt durch Nginx ausliefern.
|
|
||||||
# Der Fallback unterstützt die clientseitige Seitennavigation.
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Vendor-Dateien, Skripte, CSS und Bilder cachen.
|
|
||||||
location ~* \.(?:css|js|png|jpg|jpeg|webp|gif|svg|ico|woff|woff2)$ {
|
|
||||||
try_files $uri =404;
|
|
||||||
|
|
||||||
expires 7d;
|
|
||||||
add_header Cache-Control "public, max-age=604800";
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
if ($host = wegwichtel.de) {
|
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
} # managed by Certbot
|
|
||||||
|
|
||||||
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
|
|
||||||
server_name wegwichtel.de;
|
|
||||||
return 404; # managed by Certbot
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Wegwichtel Atlas
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
|
|
||||||
User=wegwichtel
|
|
||||||
Group=wegwichtel
|
|
||||||
|
|
||||||
WorkingDirectory=/srv/wegwichtel/Wegwichtel
|
|
||||||
EnvironmentFile=/srv/wegwichtel/Wegwichtel/.env
|
|
||||||
|
|
||||||
ExecStart=/usr/bin/node /srv/wegwichtel/Wegwichtel/server.js
|
|
||||||
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
NoNewPrivileges=true
|
|
||||||
PrivateTmp=true
|
|
||||||
ProtectSystem=full
|
|
||||||
ProtectHome=true
|
|
||||||
|
|
||||||
ReadWritePaths=/srv/wegwichtel/Wegwichtel/data
|
|
||||||
ReadWritePaths=/srv/wegwichtel/Wegwichtel/storage
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Loading…
x
Reference in New Issue
Block a user