Skip to content

Commit

Permalink
Fix Caddyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Nov 1, 2020
1 parent 03f14c4 commit 250c428
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions caddy/Caddyfile.prod
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
# Global options
storage file_system {
root /etc/caddycerts
}
}
# TODO Add an address for connections to Nomad upstream service
femiwiki.com *.femiwiki.com
tls {
dns route53
}
root /srv/femiwiki.com
index index.php
fastcgi / {$NOMAD_UPSTREAM_ADDR_fastcgi} php
gzip
header / {
root * /srv/femiwiki.com
php_fastcgi {$NOMAD_UPSTREAM_ADDR_fastcgi}
file_server
encode gzip
header {
# HSTS
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
# Enable XSS filtering for legacy browsers
Expand All @@ -17,15 +23,10 @@ header / {
# Avoid clickjacking
X-Frame-Options "DENY"
}
rewrite /w/api.php {
to /api.php
}
rewrite /w {
r /(.*)
to /index.php
}
rewrite /w/api.php /api.php
rewrite /w/* /index.php

# Proxy requests to RESTBase
# Reference:
# https://www.mediawiki.org/wiki/RESTBase/Installation#Proxy_requests_to_RESTBase_from_your_webserver
proxy /test.femiwiki.com {$NOMAD_UPSTREAM_ADDR_restbase}
reverse_proxy /test.femiwiki.com/* {$NOMAD_UPSTREAM_ADDR_restbase}

0 comments on commit 250c428

Please sign in to comment.