-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf.ws-proxy
More file actions
43 lines (33 loc) · 906 Bytes
/
Copy pathnginx.conf.ws-proxy
File metadata and controls
43 lines (33 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
upstream websocket {
server 127.0.0.1:3000;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen 443 ssl;
server_name [server] www.[server];
root /www/[server];
access_log /var/log/www/[server].access.log main;
error_log /var/log/www/[server].error.log warn;
ssl_certificate /etc/nginx/ssl/[server].crt;
ssl_certificate_key /etc/nginx/ssl/[server].key;
location / {
proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location ~ /\.ht {
deny all;
}
#if ($request_filename !~ /images/.*) {
# rewrite ^/(.*)$ /index.php last;
#}
#location ~ \.php$ {
# fastcgi_param REDIRECT_URL $redirect_url;
# include /etc/nginx/fastcgi_params;
#}
}