mirror of
https://github.com/veops/cmdb.git
synced 2025-08-06 22:37:27 +08:00
移除多余的docker-start目录
This commit is contained in:
44
docs/nginx.cmdb.conf.example
Normal file
44
docs/nginx.cmdb.conf.example
Normal file
@@ -0,0 +1,44 @@
|
||||
server {
|
||||
listen ${NGINX_PORT};
|
||||
access_log /var/log/nginx/access.cmdb.log;
|
||||
error_log /var/log/nginx/error.cmdb.log;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin";
|
||||
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_min_length 256;
|
||||
gzip_types
|
||||
text/plain
|
||||
text/css
|
||||
text/js
|
||||
text/xml
|
||||
text/javascript
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/json
|
||||
application/xml
|
||||
application/rss+xml
|
||||
image/svg+xml;
|
||||
location / {
|
||||
proxy_pass http://${CMDB_UI_HOST};
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
location /api {
|
||||
proxy_pass http://${CMDB_API_HOST};
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user