Hallo Jürgen
Danke für deine schnelle Antwort. Meine nginx.conf sieht so aus.
Wenn ich das richtig verstehe, wir ja mit
meine obere Config inkludiert !? Dort ist ja Weiterleitung eingetragen
Muss ich das dann in der /etc/nginx/nginx.conf nochmal eintragen?
LG Gersch
Danke für deine schnelle Antwort. Meine nginx.conf sieht so aus.
Code:
user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } http { log_format specialLog '[$time_local] $remote_addr forwarded for $http_x_real_ip - ' 'Request: "$request" - Status: $status - Bytes sent: $body_bytes_sent ' 'Referrer: "$http_referer" - User Agent: "$http_user_agent"'; ## # Basic Settings ## map $http_upgrade $connection_upgrade { default upgrade; '' close; } sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; include /etc/nginx/proxy_params; include /etc/nginx/fastcgi_params; ## # SSL Settings ## ssl_protocols TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log specialLog buffer=64K; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; gunzip on; gzip_static on; gzip_comp_level 2; gzip_proxied any; gzip_types application/javascript application/json application/vnd.ms-fontobject application/x-font-ttf image/svg+xml text/css text/plain text/xml; gzip_vary on; gzip_buffers 16 8k; gzip_http_version 1.1; ## # GeoIP Settings # Nur Länder aus erlaubten IP Bereichen dürfen den ReverseProxy # passieren! # https://www.howtoforge.de/anleitung/nginx-besucher-mit-dem-geoip-modul-nach-landern-blocken-debianubuntu/ ## geoip_country /usr/share/GeoIP/GeoIP.dat; map $geoip_country_code $allowed_country { default yes; BY no; BR no; KP no; KR no; RS no; RO no; RU no; CN no; CD no; NE no; GH no; IQ no; IR no; SY no; UA no; HK no; JP no; SC no; } ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; ## # Harden nginx against DDOS ## client_header_timeout 10; client_body_timeout 10; }
Code:
include /etc/nginx/conf.d/*.conf;
Code:
# Weiterleitung zu SmartHomeNG (Websocket Schnittstelle) mit Basic Auth location = / { include /etc/nginx/headers.conf; satisfy any; auth_basic "Restricted Area"; auth_basic_user_file /etc/nginx/.smartvisu; allow 127.0.0.1; allow 192.168.0.0/16; allow 10.0.0.0/16; allow ::1; deny all; # This script tests the SSL certificate and enables Websocket access with Apple devices. # If you want to limit your access to devices with certificates (recommended!), don't remove this line! access_by_lua_file /etc/nginx/scripts/hass_access.lua; # Nur Websocket Verbindungen gegen "/" durchlassen! if ($http_upgrade = websocket) { proxy_pass http://192.168.178.10:2424; } }
LG Gersch
Kommentar