|
@@ -102,6 +102,38 @@ http {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ # Element3 子域名配置
|
|
|
+ server {
|
|
|
+ listen 80;
|
|
|
+ server_name element3.hht.test;
|
|
|
+
|
|
|
+ access_log /var/log/nginx/element3.access.log main;
|
|
|
+ error_log /var/log/nginx/element3.error.log warn;
|
|
|
+
|
|
|
+ location / {
|
|
|
+ root /usr/share/nginx/html/element-plus;
|
|
|
+ index index.html index.htm;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+
|
|
|
+ # 针对不同类型的文件设置不同的缓存时间
|
|
|
+ location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
|
|
+ expires 7d;
|
|
|
+ add_header Cache-Control "public, no-transform";
|
|
|
+ }
|
|
|
+
|
|
|
+ location ~* \.(html|htm)$ {
|
|
|
+ expires 1h;
|
|
|
+ add_header Cache-Control "public, no-transform";
|
|
|
+ }
|
|
|
+
|
|
|
+ # 跨域支持
|
|
|
+ add_header 'Access-Control-Allow-Origin' $cors_origin always;
|
|
|
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
|
|
|
+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
|
|
|
+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
# Vue2 子域名配置
|
|
|
server {
|
|
|
listen 80;
|
|
@@ -628,6 +660,84 @@ http {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ # tauri-docs 子域名配置
|
|
|
+ server {
|
|
|
+ listen 80;
|
|
|
+ server_name tauri-docs.hht.test;
|
|
|
+
|
|
|
+ location / {
|
|
|
+ #root /Users/sysadmin/code/vue_project/better-scroll-docs/zh-CN;
|
|
|
+ #index index.html index.htm;
|
|
|
+
|
|
|
+ alias /usr/share/nginx/html/tauri-docs/dist/;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ index index.html;
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ # 1x-tauri-docs 子域名配置
|
|
|
+ server {
|
|
|
+ listen 80;
|
|
|
+ server_name 1x-tauri-docs.hht.test;
|
|
|
+
|
|
|
+ location / {
|
|
|
+ #root /Users/sysadmin/code/vue_project/better-scroll-docs/zh-CN;
|
|
|
+ #index index.html index.htm;
|
|
|
+
|
|
|
+ alias /usr/share/nginx/html/tauri-docs-v1/build/;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ index index.html;
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ # electron-website 子域名配置
|
|
|
+ server {
|
|
|
+ listen 80;
|
|
|
+ server_name electron-website.hht.test;
|
|
|
+
|
|
|
+ location / {
|
|
|
+ #root /Users/sysadmin/code/vue_project/better-scroll-docs/zh-CN;
|
|
|
+ #index index.html index.htm;
|
|
|
+
|
|
|
+ alias /usr/share/nginx/html/electron-website/build/;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ index index.html;
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
+ }
|
|
|
+ location /zh/ {
|
|
|
+ alias /usr/share/nginx/html/electron-website/build/;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ index index.html;
|
|
|
+ # 跨域支持
|
|
|
+ add_header 'Access-Control-Allow-Origin' $cors_origin always;
|
|
|
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
|
|
|
+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
|
|
|
+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
|
|
|
+ }
|
|
|
+ location /docs/ {
|
|
|
+ alias /usr/share/nginx/html/electron-website/build/;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ index index.html;
|
|
|
+ # 跨域支持
|
|
|
+ add_header 'Access-Control-Allow-Origin' $cors_origin always;
|
|
|
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
|
|
|
+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
|
|
|
+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
|
|
|
+ }
|
|
|
+ location /apps/ {
|
|
|
+ alias /usr/share/nginx/html/electron-website/build/;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ index index.html;
|
|
|
+ # 跨域支持
|
|
|
+ add_header 'Access-Control-Allow-Origin' $cors_origin always;
|
|
|
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
|
|
|
+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
|
|
|
+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
# 默认服务器配置
|
|
|
server {
|
|
|
listen 80 default_server;
|