# NetBox reverse proxy, adapted from upstream contrib/apache.conf. # Enable with -D NETBOX (plus -D SSL -D PROXY) in APACHE2_OPTS, /etc/conf.d/apache2. # Also requires mod_headers and mod_rewrite. # CHANGE THIS TO YOUR SERVER'S NAME ServerName netbox.example.com RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] ProxyPreserveHost On # CHANGE THIS TO YOUR SERVER'S NAME ServerName netbox.example.com SSLEngine on SSLCertificateFile /etc/ssl/apache2/netbox.crt SSLCertificateKeyFile /etc/ssl/apache2/netbox.key Alias /static /var/lib/netbox/static Options FollowSymLinks MultiViews AllowOverride None Require all granted ProxyPass ! RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} ProxyPass / http://127.0.0.1:8001/ ProxyPassReverse / http://127.0.0.1:8001/