| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571 |
- # 技术圈
- server {
- listen 80;
- server_name {{domain}}.test-jishuin.proginn.com;
- root /code/web/phphub/public;
- index index.php;
- rewrite ^/user/(\d+)$ /u/$1 permanent;
- rewrite ^/user/collect_article/(\d+)$ /jishuin/c/$1 permanent;
- rewrite ^/c/([a-z0-9]+)$ /jishuin/c/$1 last;
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- set $temp_request_id $http_x_request_id;
- if ($temp_request_id = "") {
- set $temp_request_id $request_id;
- }
- location ~ ^/(composer.json|composer.lock|ThinkPHP/|vendor/|src/|bin/|App/|.git) {
- deny all;
- }
- location ^~ /user/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
- }
- location ^~ /user/quit {
- proxy_pass http://127.0.0.1;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /topics/create {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
- }
- location ~ /topics/\d+/edit {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
- }
- location ^~ /file/proxyUpload {
- proxy_pass http://127.0.0.1;
- proxy_set_header Host {{domain}}.test.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:3000;
- proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
- }
- location ^~ /_nuxt {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
- }
- location ^~ /uapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /wapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /sapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- }
- access_log /data/log/jishuin.log proginn-logid;
- }
- # 解决方案
- server {
- listen 80;
- server_name {{domain}}.test-kaifain.proginn.com;
- set $temp_request_id $http_x_request_id;
- if ($temp_request_id = "") {
- set $temp_request_id $request_id;
- }
- location ~ ^/(composer.json|composer.lock|ThinkPHP/|vendor/|src/|bin/|App/|.git) {
- deny all;
- }
- location /api/v {
- proxy_pass http://10.200.0.1:8811;
- proxy_set_header Host $http_host;
- }
- location /_api {
- proxy_pass http://10.200.0.1:8812;
- proxy_set_header Host $http_host;
- }
- location /crpc {
- proxy_pass http://10.200.0.1:8800;
- proxy_set_header Host $http_host;
- }
- location /prpc {
- proxy_pass http://10.200.0.1:8003;
- proxy_set_header Host $http_host;
- }
- location / {
- 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;
- }
- # 兼职招聘
- server {
- listen 80;
- server_name {{domain}}.test-job.proginn.com;
- root /proginn-frontend/dist/;
- index index.html;
- rewrite ^/d/([a-z0-9]+)$ /job/detail/$1 last;
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /job$1 last;
- break;
- }
- }
- set $temp_request_id $http_x_request_id;
- if ($temp_request_id = "") {
- set $temp_request_id $request_id;
- }
- location ~ ^/(composer.json|composer.lock|ThinkPHP/|vendor/|src/|bin/|App/|.git) {
- deny all;
- }
- location ^~ /job {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test-job.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 /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:3000;
- proxy_set_header Host {{domain}}.test-job.proginn.com;
- }
- location ^~ /_nuxt {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test-job.proginn.com;
- }
- access_log /data/log/job.log proginn-logid;
- }
- # proginn
- server {
- listen 80;
- server_name {{domain}}.test.proginn.com;
- root /code/web/;
- index index.php index.html index.htm;
- rewrite ^/job/(.*)$ https://{{domain}}.test-job.proginn.com/$1 permanent;
- # rewrite ^/kaifain/(?!(add|preview))$ http://{{domain}}.test-kaifain.proginn.com/$1 permanent;
- location ^~ /u/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /uapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /wapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /sapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ~ ^/type/service$ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host $host;
- proxy_set_header X-Request-Id $temp_request_id;
- }
- location ~ ^/company$ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host $host;
- proxy_set_header X-Request-Id $temp_request_id;
- }
- location ^~ /l/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host $host;
- proxy_set_header X-Request-Id $temp_request_id;
- }
- location ^~ /skill {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /works {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /s/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /consult {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /c/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- set $temp_request_id $http_x_request_id;
- if ($temp_request_id = "") {
- set $temp_request_id $request_id;
- }
- location /community {
- rewrite ^/community(.*)$ https://{{domain}}.test-jishuin.proginn.com$1 permanent;
- }
- location /festival {
- alias /festival/dist;
- index index.html index.htm;
- if (!-e $request_filename) {
- rewrite ^(.*)$ /festival/index.html last;
- break;
- }
- }
- location /oauth2 {
- alias /code/web/openx/public/oauth2;
- index index.php;
- if (!-e $request_filename) {
- rewrite ^(.*)$ /oauth2/index.php last;
- break;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- }
- }
- location /openapi {
- alias /code/web/openx/public/api;
- index index.php;
- if (!-e $request_filename) {
- rewrite ^(.*)$ /openapi/index.php last;
- break;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- }
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- location ^~ /type/vip {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /cert {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /group {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /kaifain/add {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /kaifain/preview {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /setting/check/old_mobile {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /setting/check/real_info {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /setting/check/change_mobile {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /user/register {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /.nuxt {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /_nuxt {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /wo/cash {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /sign/new {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /type/interview {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /type/partners/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /wo/bills {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /recruit/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /salary/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /salary/detail {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /credit {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /work_down {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /frontend/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /ccf/ {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /otherpage {
- proxy_pass http://127.0.0.1:3000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /upload_image {
- proxy_pass http://127.0.0.1;
- proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
- }
- location ^~ /Public/ {
- # 匹配任何以 /Public/ 开头的地址,匹配符合以后,停止往下搜索正则,采用这一条。
- expires 1d;
- access_log off;
- }
- access_log /data/log/access.log proginn-logid;
- }
- # 新后台
- server {
- listen 80;
- server_name {{domain}}.test-rooter.proginn.com;
- root /boss/dist;
- index index.html index.htm;
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.html last;
- break;
- }
- }
- set $temp_request_id $http_x_request_id;
- if ($temp_request_id = "") {
- set $temp_request_id $request_id;
- }
- location /api {
- proxy_pass http://127.0.0.1;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /upload_image {
- proxy_pass http://127.0.0.1;
- proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
- }
- location ^~ /uapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /wapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /sapi {
- proxy_pass http://127.0.0.1:5000;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- access_log /data/log/boss.log proginn-logid;
- }
- # festival
- server {
- listen 80;
- server_name {{domain}}.test-festival.proginn.com;
- root /boss/dist;
- index index.html index.htm;
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.html last;
- break;
- }
- }
- location /api {
- proxy_pass http://127.0.0.1;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- location ^~ /upload_image {
- proxy_pass http://127.0.0.1;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- access_log /data/log/festival.log proginn-logid;
- }
- # 用户模块
- server {
- listen 5000;
- server_name {{domain}}.test.proginn.com;
- root /proginn-user/public/;
- index index.php index.html index.htm;
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- set $temp_request_id $http_x_request_id;
- if ($temp_request_id = "") {
- set $temp_request_id $request_id;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- access_log /data/log/user_proginn_access.log proginn-logid;
- }
- # bituni
- server {
- listen 80;
- server_name {{domain}}.test-bituni.proginn.com;
- root /proginn-bituni/public/;
- index index.php index.html index.htm;
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- set $temp_request_id $http_x_request_id;
- if ($temp_request_id = "") {
- set $temp_request_id $request_id;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- location ^~ /qd {
- proxy_pass http://127.0.0.1:3001;
- proxy_set_header Host {{domain}}.test.proginn.com;
- }
- access_log /data/log/user_proginn_access.log proginn-logid;
- }
|