nginx
· 3.1 KiB · Nginx configuration file
Eredeti
user root;
worker_processes 1;
events {
worker_connections 2048;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 75;
client_max_body_size 100m;
server {
listen 80;
server_name localhost;
server_tokens off;
location ^~/aiur {
rewrite ^/aiur/(.*)$ / break;
rewrite =aiur / break;
proxy_pass http://www.aiursoft.cn/;
#跨域访问的目标URL
}
location ^~/js { #实现url前缀效果匹配后跳转
rewrite (.*) http://180.101.234.40:18443/APPGHPublicInfoPlat/PortalPage/Login.aspx;
}
location ^~/chat { #实现url前缀效果匹配后跳转
rewrite (.*) https://chat.aiursoft.cn/#/ permanent;
}
location ^~/anduin { #实现url前缀效果匹配后跳转
rewrite ^/anduin/(.*)~*p https://gitlab.aiursoft.cn/users/anduin/projects permanent;
rewrite =anduin / permanent;
proxy_pass http://anduin.aiursoft.cn/;
}
location ^~/rdf { #实现url前缀效果匹配后跳转
rewrite ^/rdf/(.*)~*p https://gitlab.rdf.lol/users/rdf/projects permanent;
rewrite =rdf / permanent;
proxy_pass http://rdf.aiursoft.cn/;
}
location ^~/jimmoen { #实现url前缀效果匹配后跳转
rewrite (.*) https://jimmoen.aiursoft.cn/ permanent;
}
location ^~/anois { #实现url前缀效果匹配后跳转
rewrite (.*) https://anois.aiursoft.cn/ permanent;
}
location ^~/dvorak { #实现url前缀效果匹配后跳转
rewrite (.*) https://dvorak.aiursoft.cn/ permanent;
}
location ^~/edgeneko { #实现url前缀效果匹配后跳转
rewrite ^/edgeneko/(.*)~*p https://gitlab.aiursoft.cn/users/edgeneko/projects permanent;
rewrite =edgeneko / permanent;
proxy_pass http://edgeneko.aiursoft.cn/;
}
location ^~/aimer { #实现url前缀效果匹配后跳转
rewrite ^/aimer/(.*)~*p https://gitlab.aiursoft.cn/users/aimerneige/projects permanent;
rewrite =aimer / permanent;
proxy_pass http://aimer.aiursoft.cn/;
}
location ^~/edgenekop { #实现url前缀效果匹配后跳转
rewrite (.*) https://gitlab.aiursoft.cn/users/edgeneko/projects permanent;
}
location ^~/kit { #实现url前缀效果匹配后跳转
rewrite (.*) https://kitlau.aiursoft.cn/ permanent;
}
location ^~/cody { #实现url前缀效果匹配后跳转
rewrite (.*) https://cody.aiursoft.cn/ permanent;
}
location ^~/fissssssh { #实现url前缀效果匹配后跳转
rewrite (.*) https://fissssssh.aiursoft.cn/ permanent;
}
location ^~/box { #实现url前缀效果匹配后跳转
rewrite (.*) https://gitlab.aiursoft.cn/aiursoft/box/ permanent;
}
location ^~/gist {
rewrite (.*) https://gist.rdf.lol/ permanent;
}
location ^~/gitlab {
rewrite ^/gitlab/(.*) https://gitlab.rdf.lol/$1 permanent;
rewrite (.*) http://gitlab.rdf.lol/;
}
location ^~/whois {
rewrite (.*) https://whois.chinaz.com/ permanent;
}
location / {
root /usr/share/nginx/html/HD800S2;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
1 | user root; |
2 | worker_processes 1; |
3 | |
4 | events { |
5 | worker_connections 2048; |
6 | } |
7 | |
8 | http { |
9 | include mime.types; |
10 | default_type application/octet-stream; |
11 | sendfile on; |
12 | keepalive_timeout 75; |
13 | client_max_body_size 100m; |
14 | |
15 | server { |
16 | listen 80; |
17 | server_name localhost; |
18 | server_tokens off; |
19 | |
20 | |
21 | |
22 | location ^~/aiur { |
23 | |
24 | rewrite ^/aiur/(.*)$ / break; |
25 | rewrite =aiur / break; |
26 | |
27 | proxy_pass http://www.aiursoft.cn/; |
28 | #跨域访问的目标URL |
29 | } |
30 | location ^~/js { #实现url前缀效果匹配后跳转 |
31 | rewrite (.*) http://180.101.234.40:18443/APPGHPublicInfoPlat/PortalPage/Login.aspx; |
32 | } |
33 | location ^~/chat { #实现url前缀效果匹配后跳转 |
34 | rewrite (.*) https://chat.aiursoft.cn/#/ permanent; |
35 | } |
36 | location ^~/anduin { #实现url前缀效果匹配后跳转 |
37 | rewrite ^/anduin/(.*)~*p https://gitlab.aiursoft.cn/users/anduin/projects permanent; |
38 | rewrite =anduin / permanent; |
39 | proxy_pass http://anduin.aiursoft.cn/; |
40 | } |
41 | location ^~/rdf { #实现url前缀效果匹配后跳转 |
42 | rewrite ^/rdf/(.*)~*p https://gitlab.rdf.lol/users/rdf/projects permanent; |
43 | rewrite =rdf / permanent; |
44 | proxy_pass http://rdf.aiursoft.cn/; |
45 | } |
46 | location ^~/jimmoen { #实现url前缀效果匹配后跳转 |
47 | rewrite (.*) https://jimmoen.aiursoft.cn/ permanent; |
48 | } |
49 | location ^~/anois { #实现url前缀效果匹配后跳转 |
50 | rewrite (.*) https://anois.aiursoft.cn/ permanent; |
51 | } |
52 | location ^~/dvorak { #实现url前缀效果匹配后跳转 |
53 | rewrite (.*) https://dvorak.aiursoft.cn/ permanent; |
54 | } |
55 | location ^~/edgeneko { #实现url前缀效果匹配后跳转 |
56 | rewrite ^/edgeneko/(.*)~*p https://gitlab.aiursoft.cn/users/edgeneko/projects permanent; |
57 | rewrite =edgeneko / permanent; |
58 | proxy_pass http://edgeneko.aiursoft.cn/; |
59 | } |
60 | location ^~/aimer { #实现url前缀效果匹配后跳转 |
61 | rewrite ^/aimer/(.*)~*p https://gitlab.aiursoft.cn/users/aimerneige/projects permanent; |
62 | rewrite =aimer / permanent; |
63 | proxy_pass http://aimer.aiursoft.cn/; |
64 | } |
65 | location ^~/edgenekop { #实现url前缀效果匹配后跳转 |
66 | rewrite (.*) https://gitlab.aiursoft.cn/users/edgeneko/projects permanent; |
67 | } |
68 | location ^~/kit { #实现url前缀效果匹配后跳转 |
69 | rewrite (.*) https://kitlau.aiursoft.cn/ permanent; |
70 | } |
71 | location ^~/cody { #实现url前缀效果匹配后跳转 |
72 | rewrite (.*) https://cody.aiursoft.cn/ permanent; |
73 | } |
74 | location ^~/fissssssh { #实现url前缀效果匹配后跳转 |
75 | rewrite (.*) https://fissssssh.aiursoft.cn/ permanent; |
76 | } |
77 | |
78 | |
79 | |
80 | location ^~/box { #实现url前缀效果匹配后跳转 |
81 | rewrite (.*) https://gitlab.aiursoft.cn/aiursoft/box/ permanent; |
82 | } |
83 | |
84 | |
85 | location ^~/gist { |
86 | rewrite (.*) https://gist.rdf.lol/ permanent; |
87 | } |
88 | |
89 | location ^~/gitlab { |
90 | rewrite ^/gitlab/(.*) https://gitlab.rdf.lol/$1 permanent; |
91 | rewrite (.*) http://gitlab.rdf.lol/; |
92 | } |
93 | |
94 | |
95 | location ^~/whois { |
96 | rewrite (.*) https://whois.chinaz.com/ permanent; |
97 | } |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | location / { |
104 | root /usr/share/nginx/html/HD800S2; |
105 | try_files $uri $uri/ /index.html; |
106 | index index.html index.htm; |
107 | } |
108 | |
109 | error_page 500 502 503 504 /50x.html; |
110 | location = /50x.html { |
111 | root html; |
112 | } |
113 | } |
114 | } |