This commit is contained in:
1 parent
56d8f46434
commit
f8d4ddb19c
4 files changed
+332
-188
No files matched your search
@@ -1,26 +1,10 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName localhost
|
||||
ServerAlias maui.local
|
||||
ServerName livetrail.localhost
|
||||
DocumentRoot /var/www/html/
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [END,NE,R=permanent]
|
||||
</VirtualHost>
|
||||
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
ServerName localhost
|
||||
ServerAlias maui.local
|
||||
DocumentRoot /var/www/html/
|
||||
|
||||
SSLCertificateFile /etc/letsencrypt/live/mushu.nest.lutran.ch/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/mushu.nest.lutran.ch/privkey.pem
|
||||
Include /etc/letsencrypt/options-ssl-apache.conf
|
||||
|
||||
DirectoryIndex index.php
|
||||
|
||||
# Serve https://localhost/livetrail/ from the public web root.
|
||||
# Serve http://livetrail.localhost/ from the public web root.
|
||||
Alias /livetrail /var/www/html/livetrail/public
|
||||
|
||||
<Directory /var/www/html/livetrail/public>
|
||||
@@ -67,4 +51,42 @@
|
||||
</IfModule>
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
</IfModule>
|
||||
|
||||
# Geo (WMTS cache service). Told apart from Live Trail by host name;
|
||||
# *.localhost resolves to 127.0.0.1 without touching /etc/hosts.
|
||||
# Needs: a2enmod rewrite headers proxy_fcgi setenvif
|
||||
<VirtualHost *:80>
|
||||
ServerName geo.localhost
|
||||
|
||||
# The project root also holds vendor/, config/settings.php, lib/ and .git,
|
||||
# so only index.php and favicon.ico are reachable; everything else is
|
||||
# rewritten to the front controller below.
|
||||
DocumentRoot /var/www/html/geo
|
||||
|
||||
<Directory /var/www/html/geo>
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# CORS: Live Trail (browser) calls Geo cross-origin. "always" so the headers
|
||||
# are also sent on 403/404/5xx, otherwise the browser reports a CORS error
|
||||
# instead of the real status.
|
||||
<IfModule mod_headers.c>
|
||||
Header always set Access-Control-Allow-Origin "http://livetrail.localhost"
|
||||
Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS"
|
||||
Header always set Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With"
|
||||
Header always set Access-Control-Max-Age "86400"
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine on
|
||||
|
||||
# Preflight is answered here, without hitting PHP
|
||||
RewriteCond %{REQUEST_METHOD} =OPTIONS
|
||||
RewriteRule ^ - [R=204,END]
|
||||
|
||||
# Every request (?a=tile&id=...&x=..&y=..&z=..) goes through the front controller
|
||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
||||
RewriteCond %{REQUEST_URI} !=/index.php
|
||||
RewriteRule ^ /index.php [END,QSA]
|
||||
</VirtualHost>
|
||||
Reference in new issue
Block a user