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