proginn.nginx.conf 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. # 技术圈
  2. server {
  3. listen 80;
  4. server_name {{domain}}.test-jishuin.proginn.com;
  5. root /code/web/phphub/public;
  6. index index.php;
  7. location / {
  8. if (!-e $request_filename) {
  9. rewrite ^(.*)$ /index.php?s=$1 last;
  10. break;
  11. }
  12. }
  13. set $temp_request_id $http_x_request_id;
  14. if ($temp_request_id = "") {
  15. set $temp_request_id $request_id;
  16. }
  17. location ~ ^/(composer.json|composer.lock|ThinkPHP/|vendor/|src/|bin/|App/|.git) {
  18. deny all;
  19. }
  20. location ^~ /user/ {
  21. proxy_pass http://127.0.0.1:3000;
  22. proxy_set_header Host {{domain}}.test.proginn.com;
  23. }
  24. location ^~ /user/quit {
  25. proxy_pass http://127.0.0.1;
  26. proxy_set_header Host {{domain}}.test.proginn.com;
  27. }
  28. location ^~ /topics/create {
  29. proxy_pass http://127.0.0.1:3000;
  30. proxy_set_header Host {{domain}}.test.proginn.com;
  31. }
  32. location ~ /topics/\d+/edit {
  33. proxy_pass http://127.0.0.1:3000;
  34. proxy_set_header Host {{domain}}.test.proginn.com;
  35. }
  36. location ^~ /file/proxyUpload {
  37. proxy_pass http://127.0.0.1;
  38. proxy_set_header Host {{domain}}.test.proginn.com;
  39. }
  40. location /ajax/getmessage {
  41. proxy_pass http://127.0.0.1;
  42. proxy_set_header Host {{domain}}.test.proginn.com;
  43. }
  44. location /api {
  45. proxy_pass http://127.0.0.1;
  46. proxy_set_header Host {{domain}}.test.proginn.com;
  47. }
  48. location ^~ /.nuxt {
  49. proxy_pass http://127.0.0.1:3000;
  50. proxy_set_header Host {{domain}}.test.proginn.com;
  51. }
  52. location ^~ /_nuxt {
  53. proxy_pass http://127.0.0.1:3000;
  54. proxy_set_header Host {{domain}}.test.proginn.com;
  55. }
  56. location ~ \.php$ {
  57. fastcgi_pass unix:/var/run/php7-fpm.sock;
  58. fastcgi_index index.php;
  59. include fastcgi_params;
  60. fastcgi_param SCRIPT_FILENAME $request_filename;
  61. }
  62. access_log /data/log/jishuin.log proginn-logid;
  63. }
  64. server {
  65. listen 80;
  66. server_name {{domain}}.test.proginn.com;
  67. root /code/web/;
  68. index index.php index.html index.htm;
  69. location / {
  70. if (!-e $request_filename) {
  71. rewrite ^(.*)$ /index.php?s=$1 last;
  72. break;
  73. }
  74. }
  75. set $temp_request_id $http_x_request_id;
  76. if ($temp_request_id = "") {
  77. set $temp_request_id $request_id;
  78. }
  79. location /community {
  80. rewrite ^/community(.*)$ https://{{domain}}.test-jishuin.proginn.com$1 permanent;
  81. }
  82. location /festival {
  83. alias /festival/dist;
  84. index index.html index.htm;
  85. if (!-e $request_filename) {
  86. rewrite ^(.*)$ /festival/index.html last;
  87. break;
  88. }
  89. }
  90. location /oauth2 {
  91. alias /code/web/openx/public/oauth2;
  92. index index.php;
  93. if (!-e $request_filename) {
  94. rewrite ^(.*)$ /oauth2/index.php last;
  95. break;
  96. }
  97. location ~ \.php$ {
  98. fastcgi_pass unix:/var/run/php7-fpm.sock;
  99. fastcgi_index index.php;
  100. include fastcgi_params;
  101. fastcgi_param SCRIPT_FILENAME $request_filename;
  102. }
  103. }
  104. location /openapi {
  105. alias /code/web/openx/public/api;
  106. index index.php;
  107. if (!-e $request_filename) {
  108. rewrite ^(.*)$ /openapi/index.php last;
  109. break;
  110. }
  111. location ~ \.php$ {
  112. fastcgi_pass unix:/var/run/php7-fpm.sock;
  113. fastcgi_index index.php;
  114. include fastcgi_params;
  115. fastcgi_param SCRIPT_FILENAME $request_filename;
  116. }
  117. }
  118. location ~ \.php$ {
  119. fastcgi_pass unix:/var/run/php7-fpm.sock;
  120. fastcgi_index index.php;
  121. include fastcgi_params;
  122. }
  123. location ^~ /type/vip {
  124. proxy_pass http://127.0.0.1:3000;
  125. proxy_set_header Host {{domain}}.test.proginn.com;
  126. }
  127. location ^~ /cert {
  128. proxy_pass http://127.0.0.1:3000;
  129. proxy_set_header Host {{domain}}.test.proginn.com;
  130. }
  131. location ^~ /group {
  132. proxy_pass http://127.0.0.1:3000;
  133. proxy_set_header Host {{domain}}.test.proginn.com;
  134. }
  135. location ^~ /setting/check/old_mobile {
  136. proxy_pass http://127.0.0.1:3000;
  137. proxy_set_header Host {{domain}}.test.proginn.com;
  138. }
  139. location ^~ /setting/check/real_info {
  140. proxy_pass http://127.0.0.1:3000;
  141. proxy_set_header Host {{domain}}.test.proginn.com;
  142. }
  143. location ^~ /setting/check/change_mobile {
  144. proxy_pass http://127.0.0.1:3000;
  145. proxy_set_header Host {{domain}}.test.proginn.com;
  146. }
  147. location ^~ /user/register {
  148. proxy_pass http://127.0.0.1:3000;
  149. proxy_set_header Host {{domain}}.test.proginn.com;
  150. }
  151. location ^~ /.nuxt {
  152. proxy_pass http://127.0.0.1:3000;
  153. proxy_set_header Host {{domain}}.test.proginn.com;
  154. }
  155. location ^~ /_nuxt {
  156. proxy_pass http://127.0.0.1:3000;
  157. proxy_set_header Host {{domain}}.test.proginn.com;
  158. }
  159. location ^~ /wo/cash {
  160. proxy_pass http://127.0.0.1:3000;
  161. proxy_set_header Host {{domain}}.test.proginn.com;
  162. }
  163. location ^~ /sign/new {
  164. proxy_pass http://127.0.0.1:3000;
  165. proxy_set_header Host {{domain}}.test.proginn.com;
  166. }
  167. location ^~ /type/interview {
  168. proxy_pass http://127.0.0.1:3000;
  169. proxy_set_header Host {{domain}}.test.proginn.com;
  170. }
  171. location ^~ /type/partners/ {
  172. proxy_pass http://127.0.0.1:3000;
  173. proxy_set_header Host {{domain}}.test.proginn.com;
  174. }
  175. location ^~ /wo/bills {
  176. proxy_pass http://127.0.0.1:3000;
  177. proxy_set_header Host {{domain}}.test.proginn.com;
  178. }
  179. location ^~ /job/ {
  180. proxy_pass http://127.0.0.1:3000;
  181. proxy_set_header Host {{domain}}.test.proginn.com;
  182. }
  183. location ^~ /recruit/ {
  184. proxy_pass http://127.0.0.1:3000;
  185. proxy_set_header Host {{domain}}.test.proginn.com;
  186. }
  187. location ^~ /salary/ {
  188. proxy_pass http://127.0.0.1:3000;
  189. proxy_set_header Host {{domain}}.test.proginn.com;
  190. }
  191. location ^~ /salary/detail {
  192. proxy_pass http://127.0.0.1:3000;
  193. proxy_set_header Host {{domain}}.test.proginn.com;
  194. }
  195. location ^~ /credit {
  196. proxy_pass http://127.0.0.1:3000;
  197. proxy_set_header Host {{domain}}.test.proginn.com;
  198. }
  199. location ^~ /otherpage {
  200. proxy_pass http://127.0.0.1:3000;
  201. proxy_set_header Host {{domain}}.test.proginn.com;
  202. }
  203. location ^~ /kaifain {
  204. proxy_pass http://127.0.0.1:3000;
  205. proxy_set_header Host {{domain}}.test.proginn.com;
  206. }
  207. location ^~ /upload_image {
  208. proxy_pass http://127.0.0.1;
  209. proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
  210. }
  211. location ^~ /Public/ {
  212. # 匹配任何以 /Public/ 开头的地址,匹配符合以后,停止往下搜索正则,采用这一条。
  213. expires 1d;
  214. access_log off;
  215. }
  216. access_log /data/log/access.log proginn-logid;
  217. }
  218. # 新后台
  219. server {
  220. listen 80;
  221. server_name {{domain}}.test-rooter.proginn.com;
  222. root /boss/dist;
  223. index index.html index.htm;
  224. location / {
  225. if (!-e $request_filename) {
  226. rewrite ^(.*)$ /index.html last;
  227. break;
  228. }
  229. }
  230. set $temp_request_id $http_x_request_id;
  231. if ($temp_request_id = "") {
  232. set $temp_request_id $request_id;
  233. }
  234. location /api/admin {
  235. proxy_pass http://127.0.0.1;
  236. proxy_set_header Host {{domain}}.test.proginn.com;
  237. }
  238. location ^~ /upload_image {
  239. proxy_pass http://127.0.0.1;
  240. proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
  241. }
  242. access_log /data/log/boss.log proginn-logid;
  243. }
  244. # festival
  245. server {
  246. listen 80;
  247. server_name {{domain}}.test-festival.proginn.com;
  248. root /boss/dist;
  249. index index.html index.htm;
  250. location / {
  251. if (!-e $request_filename) {
  252. rewrite ^(.*)$ /index.html last;
  253. break;
  254. }
  255. }
  256. location /api {
  257. proxy_pass http://127.0.0.1;
  258. proxy_set_header Host {{domain}}.test.proginn.com;
  259. }
  260. location ^~ /upload_image {
  261. proxy_pass http://127.0.0.1;
  262. proxy_set_header Host {{domain}}.test-jishuin.proginn.com;
  263. }
  264. access_log /data/log/festival.log proginn-logid;
  265. }