26 lines
882 B
Text
26 lines
882 B
Text
<VirtualHost *:80>
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
RewriteEngine on
|
|
RewriteCond %{SERVER_NAME} =dns-rest-api.sunet.se
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
</VirtualHost>
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost *:<%= @dnsapiport %>>
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
|
<Location "/">
|
|
AllowMethods GET POST PATCH PUT DELETE
|
|
</Location>
|
|
|
|
ProxyTimeout 59
|
|
RequestHeader unset X-Remote-User early
|
|
ProxyPass "/" "http://localhost:5000/" connectiontimeout=59 timeout=59 Keepalive=On
|
|
ProxyPreserveHost On
|
|
|
|
ServerName dns-rest-api.sunet.se
|
|
SSLCertificateFile /etc/letsencrypt/live/dns-rest-api.sunet.se/fullchain.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/dns-rest-api.sunet.se/privkey.pem
|
|
</VirtualHost>
|
|
</IfModule>
|