nginx
· 3.0 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 ^~/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 | |
31 | location ^~/chat { #实现url前缀效果匹配后跳转 |
32 | rewrite (.*) https://chat.aiursoft.cn/#/ permanent; |
33 | } |
34 | location ^~/anduin { #实现url前缀效果匹配后跳转 |
35 | rewrite ^/anduin/(.*)~*p https://gitlab.aiursoft.cn/users/anduin/projects permanent; |
36 | rewrite =anduin / permanent; |
37 | proxy_pass http://anduin.aiursoft.cn/; |
38 | } |
39 | location ^~/rdf { #实现url前缀效果匹配后跳转 |
40 | rewrite ^/rdf/(.*)~*p https://gitlab.rdf.lol/users/rdf/projects permanent; |
41 | rewrite =rdf / permanent; |
42 | proxy_pass http://rdf.aiursoft.cn/; |
43 | } |
44 | location ^~/jimmoen { #实现url前缀效果匹配后跳转 |
45 | rewrite (.*) https://jimmoen.aiursoft.cn/ permanent; |
46 | } |
47 | location ^~/anois { #实现url前缀效果匹配后跳转 |
48 | rewrite (.*) https://anois.aiursoft.cn/ permanent; |
49 | } |
50 | location ^~/dvorak { #实现url前缀效果匹配后跳转 |
51 | rewrite (.*) https://dvorak.aiursoft.cn/ permanent; |
52 | } |
53 | location ^~/edgeneko { #实现url前缀效果匹配后跳转 |
54 | rewrite ^/edgeneko/(.*)~*p https://gitlab.aiursoft.cn/users/edgeneko/projects permanent; |
55 | rewrite =edgeneko / permanent; |
56 | proxy_pass http://edgeneko.aiursoft.cn/; |
57 | } |
58 | location ^~/aimer { #实现url前缀效果匹配后跳转 |
59 | rewrite ^/aimer/(.*)~*p https://gitlab.aiursoft.cn/users/aimerneige/projects permanent; |
60 | rewrite =aimer / permanent; |
61 | proxy_pass http://aimer.aiursoft.cn/; |
62 | } |
63 | location ^~/edgenekop { #实现url前缀效果匹配后跳转 |
64 | rewrite (.*) https://gitlab.aiursoft.cn/users/edgeneko/projects permanent; |
65 | } |
66 | location ^~/kit { #实现url前缀效果匹配后跳转 |
67 | rewrite (.*) https://kitlau.aiursoft.cn/ permanent; |
68 | } |
69 | location ^~/cody { #实现url前缀效果匹配后跳转 |
70 | rewrite (.*) https://cody.aiursoft.cn/ permanent; |
71 | } |
72 | location ^~/fissssssh { #实现url前缀效果匹配后跳转 |
73 | rewrite (.*) https://fissssssh.aiursoft.cn/ permanent; |
74 | } |
75 | |
76 | |
77 | |
78 | location ^~/box { #实现url前缀效果匹配后跳转 |
79 | rewrite (.*) https://gitlab.aiursoft.cn/aiursoft/box/ permanent; |
80 | } |
81 | |
82 | |
83 | location ^~/gist { |
84 | rewrite (.*) https://gist.rdf.lol/ permanent; |
85 | } |
86 | |
87 | location ^~/gitlab { |
88 | rewrite ^/gitlab/(.*) https://gitlab.rdf.lol/$1 permanent; |
89 | rewrite (.*) http://gitlab.rdf.lol/; |
90 | } |
91 | |
92 | |
93 | location ^~/whois { |
94 | rewrite (.*) https://whois.chinaz.com/ permanent; |
95 | } |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | location / { |
102 | root /usr/share/nginx/html/HD800S2; |
103 | try_files $uri $uri/ /index.html; |
104 | index index.html index.htm; |
105 | } |
106 | |
107 | error_page 500 502 503 504 /50x.html; |
108 | location = /50x.html { |
109 | root html; |
110 | } |
111 | } |
112 | } |