2023-02-19 21:54:03 -03:00
|
|
|
<VirtualHost *:80>
|
|
|
|
# CHANGE THIS TO YOUR SERVER'S NAME
|
|
|
|
ServerName netbox.example.com
|
|
|
|
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteCond %{HTTPS} !=on
|
|
|
|
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
|
|
|
</VirtualHost>
|
|
|
|
|
2020-04-03 15:46:48 -04:00
|
|
|
<VirtualHost *:443>
|
|
|
|
ProxyPreserveHost On
|
|
|
|
|
|
|
|
# CHANGE THIS TO YOUR SERVER'S NAME
|
|
|
|
ServerName netbox.example.com
|
|
|
|
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /etc/ssl/certs/netbox.crt
|
|
|
|
SSLCertificateKeyFile /etc/ssl/private/netbox.key
|
|
|
|
|
|
|
|
Alias /static /opt/netbox/netbox/static
|
|
|
|
|
|
|
|
<Directory /opt/netbox/netbox/static>
|
|
|
|
Options Indexes FollowSymLinks MultiViews
|
|
|
|
AllowOverride None
|
|
|
|
Require all granted
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
<Location /static>
|
|
|
|
ProxyPass !
|
|
|
|
</Location>
|
|
|
|
|
|
|
|
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
|
|
|
|
ProxyPass / http://127.0.0.1:8001/
|
|
|
|
ProxyPassReverse / http://127.0.0.1:8001/
|
|
|
|
</VirtualHost>
|