Dies ist eine alte Version des Dokuments!


Inhaltsverzeichnis

NGINX

Quelle ua 1)

Schnellere, kleinere Alternative zu Apache

Reverse Proxy

Redirect (bzw. proxy), um eine andere Webseite aufzurufen.

sudo nano /etc/nginx/sites-enabled/default In 'Server'

        location ~/fhem(.*)$ {
                proxy_pass http://127.0.0.1:8083/fhem$1$is_args$args;
                proxy_buffering off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
        }

SSL

sudo mkdir -p /etc/ssl/certs

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/openhab.key -out /etc/ssl/openhab.crt

In the NGINX configuration, place the following underneath your server_name variable:

	ssl_certificate                 /etc/ssl/openhab.crt;
	ssl_certificate_key             /etc/ssl/openhab.key;

Passwort

sudo htpasswd -c /etc/nginx/.htpasswd [mein-username]

Now the configuration file (/etc/nginx/sites-enabled/default) needs to be edited to use this password. Open the configuration file and add the following lines underneath the proxy_* settings:

	auth_basic                            "Username and Password Required";
	auth_basic_user_file                  /etc/nginx/.htpasswd;
 
Nach oben
nginx.1580481336.txt.gz · Zuletzt geändert: 2024/02/29 13:35 (Externe Bearbeitung)
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0
DFmW2CEce3htPL1uNQuHUVu4Tk6WXigFQp   Dogecoin Donations Accepted Here    DFmW2CEce3htPL1uNQuHUVu4Tk6WXigFQp  DFmW2CEce3htPL1uNQuHUVu4Tk6WXigFQp