Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Netbox (in a virtualenv) with Apache and uwsgi on Debian
apt-get install apache2 libapache2-mod-proxy-uwsgi uwsgi uwsgi-plugin-python3
[uwsgi]
project = netbox
plugins = python34
# If want to use netbox in a virtualenv set its path here.
#virtualenv = /opt/virtualenvs/netbox
base = /opt/netbox/
chdir = %(base)/%(project)
module = %(project).wsgi:application
socket = 127.0.0.1:6000
master = True
processes = 4
<VirtualHost *:80>
ServerName netbox.example.org
DocumentRoot /srv/http/netbox.example.org
<Directory /srv/http/netbox.example.org>
Require all granted
Options FollowSymLinks
AllowOverride All
</Directory>
ProxyPass /static !
ProxyPass / uwsgi://127.0.0.1:6000/
Alias /static /opt/netbox/netbox/static
<Directory /opt/netbox/netbox/static>
Require all granted
Options Indexes FollowSymLinks MultiViews
AllowOverride None
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment