mirror of
https://github.com/msfjarvis/server-config
synced 2025-08-14 18:47:00 +05:30
Caddyfile: big decommission energy
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
dc75d70c87
commit
f81856d952
1 changed files with 1 additions and 93 deletions
94
Caddyfile
94
Caddyfile
|
@ -1,84 +1,8 @@
|
||||||
(compression_config) {
|
https://dl.msfjarvis.dev {
|
||||||
gzip
|
|
||||||
}
|
|
||||||
|
|
||||||
(base_config) {
|
|
||||||
tls {
|
tls {
|
||||||
dns cloudflare
|
dns cloudflare
|
||||||
clients /etc/ssl/caddy/cloudflare-origin-pull-ca.pem
|
|
||||||
protocols tls1.2
|
protocols tls1.2
|
||||||
}
|
}
|
||||||
header / {
|
|
||||||
# Security related changes stolen from https://github.com/searx/searx-docker/blob/master/Caddyfile
|
|
||||||
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
|
||||||
X-XSS-Protection "1; mode=block"
|
|
||||||
X-Frame-Options "SAMEORIGIN"
|
|
||||||
Feature-Policy "accelerometer 'none'; autoplay 'none';camera 'none';encrypted-media 'none'; geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';payment 'none';picture-in-picture 'none';sync-xhr 'none';usb 'none'"
|
|
||||||
Referrer-Policy "no-referrer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
(proxy_config) {
|
|
||||||
try_duration 5s
|
|
||||||
transparent
|
|
||||||
}
|
|
||||||
|
|
||||||
(csp_config) {
|
|
||||||
header / {
|
|
||||||
Content-Security-Policy "
|
|
||||||
base-uri 'self';
|
|
||||||
connect-src 'self' commento.msfjarvis.dev;
|
|
||||||
default-src 'self';
|
|
||||||
frame-ancestors 'none';
|
|
||||||
frame-src asciinema.org github.com platform.twitter.com;
|
|
||||||
font-src 'self' data: commento.msfjarvis.dev;
|
|
||||||
img-src 'self' data: gfycat.com imgur.com *.imgur.com commento.msfjarvis.dev syndication.twitter.com;
|
|
||||||
object-src 'none';
|
|
||||||
script-src 'self' asciinema.org commento.msfjarvis.dev platform.twitter.com unpkg.com;
|
|
||||||
style-src 'self' commento.msfjarvis.dev 'unsafe-inline';
|
|
||||||
"
|
|
||||||
}
|
|
||||||
errors {
|
|
||||||
404 404.html
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
https://www.msfjarvis.dev {
|
|
||||||
import base_config
|
|
||||||
redir https://msfjarvis.dev{uri} 301
|
|
||||||
}
|
|
||||||
|
|
||||||
https://msfjarvis.dev {
|
|
||||||
import base_config
|
|
||||||
import compression_config
|
|
||||||
import csp_config
|
|
||||||
root /var/www/msfjarvis.dev/
|
|
||||||
log / /etc/logs/requests.log
|
|
||||||
redir 301 {
|
|
||||||
/caesium-stable https://dl.msfjarvis.dev/caesium/wahoo/stable/updater.json
|
|
||||||
/caesium-beta https://dl.msfjarvis.dev/caesium/wahoo/beta/updater.json
|
|
||||||
/caesium-alpha https://dl.msfjarvis.dev/caesium/wahoo/alpha/updater.json
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
https://bin.msfjarvis.dev {
|
|
||||||
import base_config
|
|
||||||
import compression_config
|
|
||||||
proxy / http://localhost:8081 {
|
|
||||||
import proxy_config
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
https://commento.msfjarvis.dev {
|
|
||||||
import base_config
|
|
||||||
import compression_config
|
|
||||||
proxy / http://localhost:8082 {
|
|
||||||
import proxy_config
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
https://dl.msfjarvis.dev {
|
|
||||||
import base_config
|
|
||||||
root /var/www/dl.msfjarvis.dev
|
root /var/www/dl.msfjarvis.dev
|
||||||
fastcgi / /run/php/php7.2-fpm.sock php
|
fastcgi / /run/php/php7.2-fpm.sock php
|
||||||
rewrite {
|
rewrite {
|
||||||
|
@ -86,19 +10,3 @@ https://dl.msfjarvis.dev {
|
||||||
to {dir}/index.html {dir}/index.php /_h5ai/public/index.php
|
to {dir}/index.html {dir}/index.php /_h5ai/public/index.php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
https://rss.msfjarvis.dev {
|
|
||||||
import base_config
|
|
||||||
import compression_config
|
|
||||||
proxy / http://localhost:8083 {
|
|
||||||
import proxy_config
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
https://stats.msfjarvis.dev {
|
|
||||||
import base_config
|
|
||||||
import compression_config
|
|
||||||
proxy / http://localhost:8084 {
|
|
||||||
import proxy_config
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue