1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #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;
- default_type application/octet-stream;
- #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- # '$status $body_bytes_sent "$http_referer" '
- # '"$http_user_agent" "$http_x_forwarded_for"';
- #access_log logs/access.log main;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- #gzip on;
-
- log_format bodylog escape=json '$remote_addr - [$time_local] '
- '"$request" $status $body_bytes_sent '
- '"$http_referer" "$http_user_agent" '
- '"$request_body"';
-
-
- server {
- listen 19000 ssl;
-
- access_log e:\\nginx-1.20.2\\logs\\worksheet.access.log bodylog;
- error_log e:\\nginx-1.20.2\\logs\\worksheet.error.log notice;
- # 网站域名
- server_name oa.ysstech.com;
- # 网站根目录
- root e:\\nginx-1.20.2\\workSheet;
- index index.html;
- #将 cert-file-name.pem 替换成已上传的证书文件的名称。
- ssl_certificate e:\\nginx-1.20.2\\cert\\7494583_oa.ysstech.com.pem;
- #将 cert-file-name.key 替换成已上传的证书私钥文件的名称。
- ssl_certificate_key e:\\nginx-1.20.2\\cert\\7494583_oa.ysstech.com.key;
- ssl_session_timeout 5m;
- ssl_ciphers ECDHE-RSA-AES128-GCMSHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
- ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
- ssl_prefer_server_ciphers on;
-
-
- # 网页不缓存
- location / {
- etag off;
- add_header Cache-Control "private, no-store, no-cache,must-revalidate, proxy-revalidate";
- try_files $uri /index.html;
-
- }
-
- # 普通的 js、css 等资源文件可缓存
- location /assets/ {}
- location = /favicon.ico {}
- # api 代理
- location /timeSheet/ {
- # 替换成服务端的 api 地址
- etag off;
- add_header Cache-Control "private, no-store, no-cache,must-revalidate, proxy-revalidate";
- proxy_pass http://localhost:9090;
-
- }
- }
- }
|