User Tools

Site Tools


netbox:installatie

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
netbox:installatie [2025/11/19 14:10] – [NetBox components] adminnetbox:installatie [2025/11/20 15:24] (current) – [HTTP server] admin
Line 42: Line 42:
 cp configuration_example.py configuration.py</code> cp configuration_example.py configuration.py</code>
   * open configuration.py en vul onderstaande waarden in:    * open configuration.py en vul onderstaande waarden in: 
-    * ALLOWED_HOSTS = ['fqdn.netbox']\\ vb: netbox.legoland.net+    * ALLOWED_HOSTS = ['fqdn.netbox']\\ vb: netbox.legoland.net\\ of: ''ALLOWED_HOSTS = ['*']'' en regel de toegang via Firewall.
     * postgresql info: user en wachtwoord     * postgresql info: user en wachtwoord
     * redis info: default is ok     * redis info: default is ok
Line 60: Line 60:
  
  
-===== Gunicorn or uWSGI=====+===== Gunicorn===== 
 += Webserver Gateway Interface: fucntie waarbij web servers requests forward  naar achterliggende web applicaties of frameworks geschreven in Python.  
 +<code>cp /opt/netbox/contrib/gunicorn.py /opt/netbox/gunicorn.py</code> 
 +===== Systemd ===== 
 +  * <code>cp -v /opt/netbox/contrib/*.service /etc/systemd/system/ 
 +systemctl daemon-reload</code> 
 +  * start netbox en netbox-rq <code>systemctl enable --now netbox netbox-rq</code> 
 +  * controleer de status: <code>systemctl status netbox.service</code> 
 + 
 + 
 + 
 + 
  
 ===== HTTP server===== ===== HTTP server=====
 +  * maak een SSL certificaat aan: <code>openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
 +-keyout /etc/ssl/private/netbox.key \
 +-out /etc/ssl/certs/netbox.crt</code>
 +  * install Apache: <code>sudo apt install -y apache2</code>
 +  * kopieer de config: <code>cp /opt/netbox/contrib/apache.conf /etc/apache2/sites-available/netbox.conf</code>\\ pas de severnaam aan, cfr ALLOWED_HOSTS
 +  * activeer de nodige Apache modules,de netbox site en herstart Apache: <code>a2enmod ssl proxy proxy_http headers rewrite
 +a2ensite netbox
 +systemctl restart apache2</code>
 +  * test door naar https://<fqdn>/netbox te gaan
  
 ===== LDAP authentication===== ===== LDAP authentication=====
 +
 +
  
  
netbox/installatie.1763561420.txt.gz · Last modified: by admin