This repository was archived by the owner on Mar 25, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 333
Expand file tree
/
Copy pathnginx-https.conf
More file actions
58 lines (50 loc) · 1.73 KB
/
nginx-https.conf
File metadata and controls
58 lines (50 loc) · 1.73 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
worker_processes 1;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
include /etc/nginx/mime.types;
client_max_body_size 10G;
sendfile on;
client_header_timeout 3600;
client_body_timeout 3600;
keepalive_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
proxy_connect_timeout 3600;
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/certs/cert.crt;
ssl_certificate_key /etc/nginx/certs/cert.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /server/ {
proxy_pass http://sonic-server-gateway:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /server/v3/api-docs/swagger-config {
#WORKAROUND fixed knife4j doc base path
return 200 '{"configUrl":"/server/v3/api-docs/swagger-config","oauth2RedirectUrl":"","operationsSorter":"alpha","tagsSorter":"alpha","urls":[{"name":"sonic-server-controller","serviceName":"sonic-server-controller","url":"/server/api/controller/v3/api-docs?group=default","contextPath":"/server/api/controller","order":1},{"name":"sonic-server-folder","serviceName":"sonic-server-folder","url":"/server/api/folder/v3/api-docs?group=default","contextPath":"/server/api/folder","order":2}],"validatorUrl":""}';
}
location /chrome/ {
proxy_pass http://localhost:9222/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}