Last active
July 28, 2017 20:13
-
-
Save johanfleury/20e954c90f0ce42cb6e88fcef71e680d to your computer and use it in GitHub Desktop.
Installing Netbox (in a virtualenv) with Apache and uwsgi on Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install apache2 libapache2-mod-proxy-uwsgi uwsgi uwsgi-plugin-python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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