Acathur 5 лет назад
Родитель
Сommit
0d65ebd557
2 измененных файлов с 4 добавлено и 40 удалено
  1. 3 39
      config/nginx/template/proginn.nginx.conf
  2. 1 1
      shell/container-up.sh

+ 3 - 39
config/nginx/template/proginn.nginx.conf

@@ -79,19 +79,7 @@ server {
 server {
     listen 80;
     server_name {{domain}}.test-kaifain.proginn.com;
-    root /proginn-frontend/dist/;
-    index index.html;
 
-    rewrite ^/s/([a-z0-9]+)$ /kaifain/s/$1 last;
-    rewrite ^/d/([a-z0-9]+)$ /kaifain/case/$1 last;
-    rewrite ^/c/([a-z0-9]+)$ /kaifain/c/$1 last;
-
-    location / {
-        if (!-e $request_filename) {
-            rewrite  ^(.*)$  /kaifain$1  last;
-            break;
-        }
-    }
     set $temp_request_id $http_x_request_id;
     if ($temp_request_id = "") {
         set $temp_request_id $request_id;
@@ -100,36 +88,12 @@ server {
     location ~ ^/(composer.json|composer.lock|ThinkPHP/|vendor/|src/|bin/|App/|.git) {
         deny all;
     }
-    location ^~ /kaifain {
-        proxy_pass http://127.0.0.1:8810;
-        proxy_set_header Host {{domain}}.test-kaifain.proginn.com;
-    }
-    location ^~ /user/quit {
-        proxy_pass http://127.0.0.1;
-        proxy_set_header Host {{domain}}.test.proginn.com;
-    }
 
-    location ^~ /file/proxyUpload {
-        proxy_pass http://127.0.0.1;
-        proxy_set_header Host {{domain}}.test.proginn.com;
+    location / {
+      proxy_pass http://127.0.0.1:8810;
+      proxy_set_header Host {{domain}}.test-kaifain.proginn.com;
     }
 
-    location /ajax/getmessage {
-        proxy_pass http://127.0.0.1;
-        proxy_set_header Host {{domain}}.test.proginn.com;
-    }
-    location /api {
-        proxy_pass http://127.0.0.1;
-        proxy_set_header Host {{domain}}.test.proginn.com;
-    }
-    location ^~ /.nuxt {
-        proxy_pass http://127.0.0.1:8810;
-        proxy_set_header Host {{domain}}.test-kaifain.proginn.com;
-    }
-    location ^~ /_nuxt {
-        proxy_pass http://127.0.0.1:8810;
-        proxy_set_header Host {{domain}}.test-kaifain.proginn.com;
-    }
     access_log /data/log/kafain.log proginn-logid;
 }
 # 兼职招聘

+ 1 - 1
shell/container-up.sh

@@ -78,9 +78,9 @@ service php7.2-fpm start
 service nginx start
 cd /proginn-frontend
 chown -R www-data:www-data .
+su -c "cd /workspace/kaifain/client && npx yarn --registry=https://registry.npm.taobao.org install && pm2 start ecosystem.config.yml" -s /bin/bash - www-data
 su -c "cd /proginn-frontend && rm -rf node_modules && npx yarn --registry=https://registry.npm.taobao.org install && npm run build_dev" -s /bin/bash - www-data
 su -c "cd /proginn-frontend && pm2 start npm --name proginn-frontend -- run start_dev" -s /bin/bash - www-data
-su -c "cd /workspace/kaifain/client && npx yarn --registry=https://registry.npm.taobao.org install && pm2 start npm --name kaifain-client -- run start" -s /bin/bash - www-data
 
 # 启动定时脚本
 service cron restart