Skip to content

Commit

Permalink
Create default
Browse files Browse the repository at this point in the history
  • Loading branch information
universalbit-dev authored May 15, 2024
1 parent 36de78c commit c2684ec
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions nginx/01/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
server {
listen 80;
listen [::]:80;
server_name 192.168.1.144;
return 301 https://$server_name$request_uri;
}

server {
server_name 192.168.1.144;
listen 8001;
return 301 https://$host$request_uri;
}

upstream websocket {
server 192.168.1.144;
server 192.168.1.145;
server 192.168.1.146;
server 192.168.1.147;
}

server {
listen 443 ssl;
listen [::]:443 ssl;
server_name 192.168.1.144;
root /usr/share/nginx/html;
ssl_certificate /etc/nginx/ssl/host.cert;
ssl_certificate_key /etc/nginx/ssl/host.key;

location / {
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_pass http://websocket;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}

0 comments on commit c2684ec

Please sign in to comment.