Netbox: getting-started.md - Apache howto error

Created on 28 Jun 2016  路  9Comments  路  Source: netbox-community/netbox

Hello,

Following the installation howto, I noticed an error in the Apache configuration section.

TheProxPass and ProxyPassReverse lines have an ending semi-column, wich leads to an error when restarting apache.

Additionnaly, it might be worth mentioning that the Apache proxy module should be enabled as well, throug
a2enmod proxy

bug

Most helpful comment

I'm on a clean install of Ubuntu 14.04.4 LTS and can confirm that this is my Apache 2.4.7 config file:

<VirtualHost *:80>
    ProxyPreserveHost On

    ServerName ipam.<redacted>

    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>

    ProxyPass / http://127.0.0.1:8001/
    ProxyPassReverse / http://127.0.0.1:8001/
</VirtualHost>

I also had to enable both of the following modules

a2enmod proxy
a2enmod proxy_http

All 9 comments

Fixed the Apache config in b37503ed8fec7ee3d88e6cca7924fd10c08e5705

Running Apache 2.4, and I had to make the following changes to what was suggested in getting-started.md

(add "/" to the end of the guincorn URL)
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001/

(remove "/" from the alias for static)
Alias /static /opt/netbox/netbox/static

Could someone please confirm that this change works fully with Apache? This will be the third time I've had to modify it.

Doing a clean install now. I will let you know.

I'm on a clean install of Ubuntu 14.04.4 LTS and can confirm that this is my Apache 2.4.7 config file:

<VirtualHost *:80>
    ProxyPreserveHost On

    ServerName ipam.<redacted>

    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>

    ProxyPass / http://127.0.0.1:8001/
    ProxyPassReverse / http://127.0.0.1:8001/
</VirtualHost>

I also had to enable both of the following modules

a2enmod proxy
a2enmod proxy_http

I can confirm bzoellers apache configuration. Running the same configuration on a clean install of Ubuntu 14.0.4.4 LTS.

Here is my apache config...it differs a little bit than bzoellers as it includes the Order allow,deny

Also received a report that the Alias line should read:

Alias /static/ /opt/netbox/netbox/static/

(with the trailing slash). I guess the two element just have to match, either both with or both without the trailing slash.

Hi,

I had to remove the trailing slash in the Alias directive, and add trailing slashes to the ProxyPass statements to have it work.
My config looks exactly like Billizoellers'.

(Debian Testing with Apache 2.4.20-2)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markve-sa picture markve-sa  路  4Comments

bellwood picture bellwood  路  3Comments

tyler-8 picture tyler-8  路  3Comments

VictorJ76 picture VictorJ76  路  3Comments

Ali-Yazdani picture Ali-Yazdani  路  3Comments