-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
90 lines (70 loc) · 2.36 KB
/
Copy pathnginx.conf
File metadata and controls
90 lines (70 loc) · 2.36 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
index index.html index.htm
default_type application/octet-stream;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, DELETE";
add_header Access-Control-Max-Age "3600";
add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization";
log_format combined_time '$remote_addr - $remote_user [$time_local]'
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time';
#access_log logs/access.log main;
client_header_buffer_size 1k;
large_client_header_buffers 4 16k;
client_max_body_size 1000m;
client_body_buffer_size 128k;
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 65;
send_timeout 10;
sendfile on;
#tcp_nopush on
#gzip on;
gzip on;
gzip_static on;
gzip_buffers 16 8k;
gzip_http_version 1.0;
gzip_comp_level 6;
gzip_min_length 100;
gzip_types text/plain application/json application/xml application/x-javascript text/xml text/css image/x-icon image/gif image/jpeg;
gzip_vary on;
gzip_proxied any;
upstream backend {
server localhost:8080;
}
server {
listen 80;
server_name localhost;
index index.html index.htm;
autoindex on;
root E:\dev\WebDeployment\TokenAuthSample;
location / {
try_files $uri $uri/ @backend;
}
location ~* \.(js|css|rdf|jpg|jpeg|gif|png|svg|ico|pdf|html|htm|map)$ {
}
location @backend {
rewrite ^(.*)$ /prototype-presentation-web$1 break;
proxy_pass http://backend;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Following is necessary for Websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
error_page 404 /error_page/404.html;
error_page 500 502 503 504 /error_page/500.html;
}
}