External Reverse Proxy and Netbox base_path #3764

Closed
opened 2025-12-29 18:31:07 +01:00 by adam · 1 comment
Owner

Originally created by @briantownjr on GitHub (Jun 10, 2020).

I have an apache reverse proxy running at 192.168.1.5
Netbox instance running at 192.168.1.6.
gunicorn running bound to 0.0.0.0:8001

Revprox config:

        <Location /netbox>
                RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
                ProxyPass http://10.97.5.123:8001
                ProxyPassReverse http://http://10.97.5.123:8001
        </Location>

On Netbox configuration.py includes both 192.168.1.6 and 192.168.1.5 in the ALLOWED_HOSTS

This wasn't working at all until I added base_url in configuration.py to include 'opt/netbox/netbox/static'

However the connection complains about not being able to find certain files.

"404 NOT FOUND: 192.168.5.5opt/netbox/netbox/static/media-failure/?filename=select2-bootstrap-0.1.0-beta.10/select2-bootstrap.min.css"

Maybe i'm missing something here in my main apache config?

Originally created by @briantownjr on GitHub (Jun 10, 2020). I have an apache reverse proxy running at 192.168.1.5 Netbox instance running at 192.168.1.6. gunicorn running bound to 0.0.0.0:8001 Revprox config: ``` <Location /netbox> RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} ProxyPass http://10.97.5.123:8001 ProxyPassReverse http://http://10.97.5.123:8001 </Location> ``` On Netbox configuration.py includes both 192.168.1.6 and 192.168.1.5 in the ALLOWED_HOSTS This wasn't working at all until I added base_url in configuration.py to include 'opt/netbox/netbox/static' However the connection complains about not being able to find certain files. "404 NOT FOUND: 192.168.5.5opt/netbox/netbox/static/media-failure/?filename=select2-bootstrap-0.1.0-beta.10/select2-bootstrap.min.css" Maybe i'm missing something here in my main apache config?
adam closed this issue 2025-12-29 18:31:07 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 10, 2020):

This issue has been closed as it does not conform to one of the provided templates as required by the contributing guide. If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).

@jeremystretch commented on GitHub (Jun 10, 2020): This issue has been closed as it does not conform to one of the [provided templates](https://github.com/netbox-community/netbox/issues/new/choose) as required by the [contributing guide](https://github.com/netbox-community/netbox/blob/master/CONTRIBUTING.md). If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3764