Upload files to "Apache 2 site"
parent
bd0fe79227
commit
11401721ab
|
|
@ -0,0 +1,33 @@
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName jsonviewer.example.com
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/jsonviewer.example.com-error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/jsonviewer.example.com-access.log combined
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteCond %{HTTPS} !=on
|
||||||
|
RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R=301,L]
|
||||||
|
ProxyPass / http://127.0.0.1:2982/
|
||||||
|
ProxyPassReverse / http://127.0.0.1:2982/
|
||||||
|
ProxyPreserveHost On
|
||||||
|
ProxyAddHeaders On
|
||||||
|
RequestHeader set X-Forwarded-Proto "http"
|
||||||
|
RewriteCond %{SERVER_NAME} =jsonviewer.example.com
|
||||||
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<IfModule mod_ssl.c>
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName jsonviewer.example.com
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/jsonviewer.example.com-error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/jsonviewer.example.com-access.log combined
|
||||||
|
RewriteEngine on
|
||||||
|
ProxyPass / http://127.0.0.1:2982/
|
||||||
|
ProxyPassReverse / http://127.0.0.1:2982/
|
||||||
|
ProxyPreserveHost On
|
||||||
|
ProxyAddHeaders On
|
||||||
|
RequestHeader set X-Forwarded-Proto "http"
|
||||||
|
SSLCertificateFile /etc/letsencrypt/live/jsonviewer.example.com/fullchain.pem
|
||||||
|
SSLCertificateKeyFile /etc/letsencrypt/live/jsonviewer.example.com/privkey.pem
|
||||||
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
||||||
|
</VirtualHost>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
Loading…
Reference in New Issue