|
@@ -1,18 +1,29 @@
|
|
|
# Web Server Installation
|
|
|
|
|
|
-We'll set up a simple WSGI front end using [gunicorn](http://gunicorn.org/) for the purposes of this guide. For web servers, we provide example configurations for both [nginx](https://www.nginx.com/resources/wiki/) and [Apache](http://httpd.apache.org/docs/2.4). (You are of course free to use whichever combination of HTTP and WSGI services you'd like.) We'll also use [supervisord](http://supervisord.org/) to enable service persistence.
|
|
|
+We'll set up a simple WSGI front end using [gunicorn](http://gunicorn.org/) for the purposes of this guide. For web servers, we provide example configurations for both [nginx](https://www.nginx.com/resources/wiki/) and [Apache](http://httpd.apache.org/docs/2.4). (You are of course free to use whichever combination of HTTP and WSGI services you'd like.) We'll also use [supervisord](http://supervisord.org/) to enable service persistence.
|
|
|
|
|
|
+Debian/Ubuntu
|
|
|
```
|
|
|
# sudo apt-get install -y gunicorn supervisor
|
|
|
```
|
|
|
+Centos/RHEL
|
|
|
+```
|
|
|
+# sudo yum install -y gunicorn supervisor
|
|
|
+```
|
|
|
|
|
|
## Option A: nginx
|
|
|
|
|
|
The following will serve as a minimal nginx configuration. Be sure to modify your server name and installation path appropriately.
|
|
|
|
|
|
+Debian/Ubuntu
|
|
|
+
|
|
|
```
|
|
|
# sudo apt-get install -y nginx
|
|
|
```
|
|
|
+Centos/RHEL
|
|
|
+```
|
|
|
+# sudo yum install -y nginx
|
|
|
+```
|
|
|
|
|
|
Once nginx is installed, proceed with the following configuration:
|
|
|
|
|
@@ -43,7 +54,7 @@ Save this configuration to `/etc/nginx/sites-available/netbox`. Then, delete `/e
|
|
|
```
|
|
|
# cd /etc/nginx/sites-enabled/
|
|
|
# rm default
|
|
|
-# ln -s /etc/nginx/sites-available/netbox
|
|
|
+# ln -s /etc/nginx/sites-available/netbox
|
|
|
```
|
|
|
|
|
|
Restart the nginx service to use the new configuration.
|
|
@@ -57,9 +68,16 @@ To enable SSL, consider this guide on [securing nginx with Let's Encrypt](https:
|
|
|
|
|
|
## Option B: Apache
|
|
|
|
|
|
+Debian/Ubuntu
|
|
|
+
|
|
|
```
|
|
|
# sudo apt-get install -y apache2
|
|
|
```
|
|
|
+Centos/RHEL
|
|
|
+
|
|
|
+```
|
|
|
+# sudo yum install -y httpd
|
|
|
+```
|
|
|
|
|
|
Once Apache is installed, proceed with the following configuration (Be sure to modify the `ServerName` appropriately):
|
|
|
|