zhuyou commited on
Commit
bbd2b72
1 Parent(s): 40055d9
Files changed (4) hide show
  1. Dockerfile +1 -1
  2. frps.toml +1 -0
  3. index.html +10 -0
  4. nginx.conf +4 -1
Dockerfile CHANGED
@@ -9,10 +9,10 @@ WORKDIR /app
9
 
10
  # 复制Nginx配置文件
11
  COPY nginx.conf /etc/nginx/nginx.conf
 
12
 
13
  # 在Dockerfile中添加
14
  RUN chmod -R 777 /var/cache/nginx
15
-
16
  RUN chmod -R 777 /var/run /etc/nginx/conf.d
17
 
18
  # 复制frps及配置文件到/app目录
 
9
 
10
  # 复制Nginx配置文件
11
  COPY nginx.conf /etc/nginx/nginx.conf
12
+ COPY index.html /usr/share/nginx/html/index.html
13
 
14
  # 在Dockerfile中添加
15
  RUN chmod -R 777 /var/cache/nginx
 
16
  RUN chmod -R 777 /var/run /etc/nginx/conf.d
17
 
18
  # 复制frps及配置文件到/app目录
frps.toml CHANGED
@@ -5,3 +5,4 @@ dashboard_port = 7777
5
  dashboard_user = zhuyou
6
  dashboard_pwd = zhuyou123
7
  auto_token = zhuyou
 
 
5
  dashboard_user = zhuyou
6
  dashboard_pwd = zhuyou123
7
  auto_token = zhuyou
8
+ subdomain_host = "zhuyougu-frps.hf.space/user"
index.html ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>首页</title>
6
+ </head>
7
+ <body>
8
+ <h1>首页</h1>
9
+ </body>
10
+ </html>
nginx.conf CHANGED
@@ -16,11 +16,14 @@ http {
16
  charset utf-8;
17
 
18
  location / {
 
 
 
19
  proxy_set_header Host $http_host;
20
  proxy_set_header X-Real-IP $remote_addr;
21
  proxy_set_header REMOTE-HOST $remote_addr;
22
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
23
- proxy_pass http://localhost:7777/;
24
  }
25
 
26
  location /user/ {
 
16
  charset utf-8;
17
 
18
  location / {
19
+ root /usr/share/nginx/html;
20
+ index index.html;
21
+ try_files $uri $uri/ /index.html;
22
  proxy_set_header Host $http_host;
23
  proxy_set_header X-Real-IP $remote_addr;
24
  proxy_set_header REMOTE-HOST $remote_addr;
25
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
26
+ proxy_pass http://localhost:7000/;
27
  }
28
 
29
  location /user/ {