mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
fixed nginx config and all configs (#167)
Basically the nginx config that was used will have this bug called "peer data channel closed" that will happen every single 3 minutes or so and then it will automatically reconnect the nginx file basically whenever someone was in HTTPS instead of HTTP it will just not trust it but with the nginx config and adding the headers the browser will trust the WS connection
This commit is contained in:
@@ -575,29 +575,30 @@ server {
|
||||
listen 80;
|
||||
server_name ${DOMAIN};
|
||||
|
||||
# Public rooms: no authentication
|
||||
location ~ ^/${PATH_PREFIX}/.*$ {
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:${DOCKER_PORT};
|
||||
proxy_set_header Host \$host;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# WebSocket headers
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host \$host;
|
||||
|
||||
# Forwarding headers for reverse proxy
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
|
||||
proxy_cache_bypass \$http_upgrade;
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 900s;
|
||||
}
|
||||
|
||||
# Admin Panel Restricted Access
|
||||
location / {
|
||||
location ~ ^/$ {
|
||||
auth_basic "Restricted Access";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
error_log /var/log/nginx/auth_error.log warn;
|
||||
|
||||
proxy_pass http://127.0.0.1:${DOCKER_PORT};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host \$host;
|
||||
proxy_cache_bypass \$http_upgrade;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
@@ -798,4 +799,3 @@ echo -e "${AQUA}\n==================================================${NC}"
|
||||
|
||||
# Final message
|
||||
echo -e "${GREEN}Installation complete! Access your Neko Rooms at https://${DOMAIN}${NC}"
|
||||
|
||||
|
||||
@@ -575,29 +575,30 @@ server {
|
||||
listen 80;
|
||||
server_name ${DOMAIN};
|
||||
|
||||
# Public rooms: no authentication
|
||||
location ~ ^/${PATH_PREFIX}/.*$ {
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:${DOCKER_PORT};
|
||||
proxy_set_header Host \$host;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# WebSocket headers
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host \$host;
|
||||
|
||||
# Forwarding headers for reverse proxy
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
|
||||
proxy_cache_bypass \$http_upgrade;
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 900s;
|
||||
}
|
||||
|
||||
# Admin Panel Restricted Access
|
||||
location / {
|
||||
location ~ ^/$ {
|
||||
auth_basic "Restricted Access";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
error_log /var/log/nginx/auth_error.log warn;
|
||||
|
||||
proxy_pass http://127.0.0.1:${DOCKER_PORT};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host \$host;
|
||||
proxy_cache_bypass \$http_upgrade;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
@@ -799,4 +800,3 @@ echo -e "${AQUA}\n==================================================${NC}"
|
||||
|
||||
# Final message
|
||||
echo -e "${GREEN}Installation complete! Access your Neko Rooms at https://${DOMAIN}${NC}"
|
||||
|
||||
|
||||
+9
-1
@@ -2,12 +2,13 @@
|
||||
|
||||
echo "
|
||||
---------------------------------------------------------------
|
||||
__
|
||||
|
||||
____ ___ / /______ _________ ____ ____ ___ _____
|
||||
/ __ \/ _ \/ //_/ __ \ / ___/ __ \/ __ \/ __ '__ \/ ___/
|
||||
/ / / / __/ ,< / /_/ /_____/ / / /_/ / /_/ / / / / / (__ )
|
||||
/_/ /_/\___/_/|_|\____/_____/_/ \____/\____/_/ /_/ /_/____/
|
||||
|
||||
|
||||
Automatic installer by m1k1o
|
||||
---------------------------------------------------------------
|
||||
|
||||
@@ -166,6 +167,12 @@ while true; do
|
||||
break
|
||||
done
|
||||
|
||||
PUBLIC_IP=$(curl -s https://ipinfo.io/ip)
|
||||
read -rp "Enter your server's public IP address (autodetected: ${PUBLIC_IP}): " NEKO_NAT1TO1
|
||||
if [[ -z "${NEKO_NAT1TO1}" ]]; then
|
||||
NEKO_NAT1TO1="${PUBLIC_IP}"
|
||||
fi
|
||||
|
||||
touch "./usersfile"
|
||||
|
||||
# Users
|
||||
@@ -209,6 +216,7 @@ echo "[Y] Got all settings..."
|
||||
echo "NEKO_ROOMS_TRAEFIK_ENTRYPOINT=websecure"
|
||||
echo "NEKO_ROOMS_TRAEFIK_NETWORK=neko-rooms-traefik"
|
||||
echo "NEKO_ROOMS_TRAEFIK_CERTRESOLVER=lets-encrypt"
|
||||
echo "NEKO_NAT1TO1=${NEKO_NAT1TO1}"
|
||||
} > .env
|
||||
|
||||
echo "[Y] Creating env..."
|
||||
|
||||
Reference in New Issue
Block a user