pin_guide_ms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.3 KiB

3 years ago
  1. # pin_guide_ms.public.conf
  2. # pin_guide_ms nginx public config.
  3. # This is a [public] api. It means nginx listen on port 80.
  4. # @version 171017:1
  5. # @author karminski <code.karminski@outlook.com>
  6. # server config
  7. server {
  8. listen 80;
  9. server_name pin-guide-ms.juejin.im;
  10. # origin sessings
  11. include /data/apps/nginx/conf/origin/gold.xitu.io_and_juejin.im.conf;
  12. root /data/repo/pin_guide_ms/src/;
  13. access_log /data/repo/pin_guide_ms/logs/pin_guide_ms.public.access.log logstash;
  14. error_log /data/repo/pin_guide_ms/logs/pin_guide_ms.public.error.log;
  15. client_body_temp_path /data/tmp/nginx/client_body_temp/ 1 2;
  16. proxy_temp_path /data/tmp/nginx/proxy_temp/ 1 2;
  17. fastcgi_temp_path /data/tmp/nginx/fastcgi_temp/ 1 2;
  18. rewrite "^(.*)/v1/setPlaceholderGuide$" $1/setPlaceholderGuideApi.php?$query_string last;
  19. rewrite "^(.*)/v1/getPlaceholderGuide$" $1/getPlaceholderGuideApi.php?$query_string last;
  20. rewrite "^(.*)/v1/updatePlaceholderGuide$" $1/updatePlaceholderGuideApi.php?$query_string last;
  21. rewrite "^(.*)/v1/findPlaceholderGuide$" $1/findPlaceholderGuideApi.php?$query_string last;
  22. rewrite "^(.*)/v1/delPlaceholderGuide$" $1/delPlaceholderGuideApi.php?$query_string last;
  23. rewrite "^(.*)/status$" $1/status.php last;
  24. rewrite "^(.*)/server_env$" $1/server_env.php last;
  25. if ($request_uri ~ " ") {
  26. return 444;
  27. }
  28. location = /ENV {
  29. allow 127.0.0.1;
  30. deny all;
  31. }
  32. location ~* ^/DOCUMENTS{
  33. return 404;
  34. }
  35. location ~* ^/protected{
  36. return 404;
  37. }
  38. location ~* ^/test{
  39. return 404;
  40. }
  41. location ~* ^/logs{
  42. return 404;
  43. }
  44. location ~* ^/conf{
  45. return 404;
  46. }
  47. location = /favicon.ico {
  48. allow all;
  49. log_not_found off;
  50. access_log off;
  51. }
  52. location ~* ^/not_found{
  53. return 404;
  54. }
  55. location ~ /\. {
  56. deny all;
  57. access_log off;
  58. log_not_found off;
  59. }
  60. location ~ \.php$ {
  61. if ( $fastcgi_script_name ~ \..*\/.*php ) {
  62. return 403;
  63. }
  64. include fastcgi.conf;
  65. fastcgi_pass 127.0.0.1:9000;
  66. fastcgi_index index.php;
  67. }
  68. }