Skip to content

Instantly share code, notes, and snippets.

@johanfleury
Last active July 28, 2017 20:13
Show Gist options
  • Save johanfleury/20e954c90f0ce42cb6e88fcef71e680d to your computer and use it in GitHub Desktop.
Save johanfleury/20e954c90f0ce42cb6e88fcef71e680d to your computer and use it in GitHub Desktop.
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