-
-
Save evansharp/2afeeeddc01f8605d8823981f52397b7 to your computer and use it in GitHub Desktop.
DynMap Apache2 + ReverseProxy + LetsEncrypt configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_ssl.c> | |
<VirtualHost *:443> | |
ServerName map.mysite.by | |
ServerAlias www.map.mysite.by | |
UseCanonicalName On | |
TimeOut 30 | |
# Identical to combined format, except that we swap remote-host (%h) with X-Forwared-For | |
LogFormat "%{X-Forwaded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" | |
CustomLog "|$/usr/bin/cronolog -l /home/dmitry/vhosts/mysite.by/logs/map-access.log /home/dmitry/vhosts/mysite.by/logs/map-access.%Y-%m-%d.log" vhost_combined | |
ErrorLog "|$/usr/bin/cronolog -l /home/dmitry/vhosts/mysite.by/logs/map-error.log /home/dmitry/vhosts/mysite.by/logs/map-error.%Y-%m-%d.log" | |
RewriteEngine on | |
#LogLevel warn rewrite:trace4 | |
RequestHeader set HTTP_HOST map.mysite | |
# Force browsers to not cache non-static stuff client-side | |
Header merge Cache-Control no-store | |
<Location /> | |
Order deny,allow | |
Allow from all | |
ProxyPass http://127.0.0.1:8123/ | |
</Location> | |
<IfVersion >= 2.4> | |
# this happens only in versions greater or equal 2.4.0. | |
<Location /> | |
Require all granted | |
</Location> | |
</IfVersion> | |
ProxyRequests off | |
ProxyPass "/dynmap" "http://127.0.0.1:8123/" | |
ProxyPass "/js" "http://127.0.0.1:8123/js/" | |
ProxyPass "/js/minecraft" "http://127.0.0.1:8123/js/minecraft/" | |
ProxyPass "/js/map" "http://127.0.0.1:8123/js/map/" | |
ProxyPass "/css" "http://127.0.0.1:8123/css/" | |
ProxyPass "/standalone" "http://127.0.0.1:8123/standalone" | |
ProxyPass "/up/configuration" "http://127.0.0.1:8123/up/configuration" | |
ProxyPass "/version.js" "http://127.0.0.1:8123/version.js" | |
ProxyPass "/images" "http://127.0.0.1:8123/images/" | |
ProxyPass "/tiles/world/t" "http://127.0.0.1:8123/tiles/world/t" | |
ProxyPass "/tiles/world/t_day" "http://127.0.0.1:8123/tiles/world/t_day" | |
ProxyPass "/tiles/world_nether/nt" "http://127.0.0.1:8123/tiles/world_nether/nt" | |
ProxyPass "/tiles/world_nether/flat" "http://127.0.0.1:8123/tiles/world_nether/flat" | |
ProxyPass "/tiles/world_the_end/st" "http://127.0.0.1:8123/tiles/world_the_end/st" | |
ProxyPass "/up/world/world" "http://127.0.0.1:8123/up/world/world" | |
ProxyPass "/up/world/world_nether" "http://127.0.0.1:8123/up/world/world_nether" | |
ProxyPass "/up/world/world_the_end" "http://127.0.0.1:8123/up/world/world_the_end" | |
ProxyPass "/mapimages" "http://127.0.0.1:8123/mapimages/" | |
ProxyPass "/tiles/_markers_" "http://127.0.0.1:8123/tiles/_markers_" | |
ProxyPass "/tiles/faces/16x16" "http://127.0.0.1:8123/tiles/faces/16x16" | |
ProxyPass "/tiles/faces/32x32" "http://127.0.0.1:8123/tiles/faces/32x32" | |
ProxyPassReverse "/dynmap" "http://127.0.0.1:8123/" | |
ProxyPassReverse "/map" "http://127.0.0.1:8123/" | |
ProxyPassReverse "/js" "http://127.0.0.1:8123/js/" | |
ProxyPassReverse "/js/minecraft" "http://127.0.0.1:8123/js/minecraft/" | |
ProxyPassReverse "/js/map" "http://127.0.0.1:8123/js/map/" | |
ProxyPassReverse "/css" "http://127.0.0.1:8123/css/" | |
ProxyPassReverse "/standalone" "http://127.0.0.1:8123/standalone" | |
ProxyPassReverse "/up/configuration" "http://127.0.0.1:8123/up/configuration" | |
ProxyPassReverse "/version.js" "http://127.0.0.1:8123/version.js" | |
ProxyPassReverse "/images" "http://127.0.0.1:8123/images/" | |
ProxyPassReverse "/tiles/world/t" "http://127.0.0.1:8123/tiles/world/t" | |
ProxyPassReverse "/tiles/world/t_day" "http://127.0.0.1:8123/tiles/world/t_day" | |
ProxyPassReverse "/tiles/world_nether/nt" "http://127.0.0.1:8123/tiles/world_nether/nt" | |
ProxyPassReverse "/tiles/world_the_end/st" "http://127.0.0.1:8123/tiles/world_the_end/st" | |
ProxyPassReverse "/up/world/world" "http://127.0.0.1:8123/up/world/world" | |
ProxyPassReverse "/up/world/world_nether" "http://127.0.0.1:8123/up/world/world_nether" | |
ProxyPassReverse "/up/world/world_the_end" "http://127.0.0.1:8123/up/world/world_the_end" | |
ProxyPassReverse "/mapimages" "http://127.0.0.1:8123/mapimages/" | |
ProxyPassReverse "/tiles/_markers_" "http://127.0.0.1:8123/tiles/_markers_" | |
ProxyPassReverse "/tiles/faces/16x16" "http://127.0.0.1:8123/tiles/faces/16x16" | |
ProxyPassReverse "/tiles/faces/32x32" "http://127.0.0.1:8123/tiles/faces/32x32" | |
Include /etc/letsencrypt/options-ssl-apache.conf | |
SSLCertificateFile /etc/letsencrypt/live/map.mysite.by/cert.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/map.mysite.by/privkey.pem | |
Include /etc/letsencrypt/options-ssl-apache.conf | |
SSLCertificateChainFile /etc/letsencrypt/live/map.mysite.by/chain.pem | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment