proginn.nginx.conf 7.8 KB

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