domain.conf 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. server {
  2. server_name me.5dev.cn jiaoyou.qizhixiong.com;
  3. listen 80;
  4. autoindex on;
  5. set $charset utf-8;
  6. charset $charset;
  7. #set $rootdir /www/jiaoyou20190507/public;
  8. set $rootdir /www/txhl-zsc/fxb-front;
  9. root $rootdir;
  10. index index.php index.html;
  11. if ( $request_uri ~* /(applet\/content|applet_on\/content) ) {
  12. rewrite ^/(.*)/content/(.*) /$1/content/index.php?$2 last;
  13. }
  14. if ( $request_uri ~* /log\/data.add ) {
  15. rewrite ^/log/(.*?) /log/index.php?$1 last;
  16. }
  17. if ( $request_uri ~* /system/wechat ) {
  18. rewrite ^/system/wechat /system/index.php?m=payment&a=wechat_notify last;
  19. }
  20. if ( $request_uri ~* /pay/pay/notify ) {
  21. rewrite ^/pay/pay/notify/([0-9+]) /pay/pay/index.php?l=api.notify&account_id=$1 last;
  22. }
  23. location / {
  24. # First attempt to serve request as file, then
  25. # as directory, then fall back to displaying a 404.
  26. try_files $uri $uri/ =404;
  27. # Uncomment to enable naxsi on this location
  28. # include /etc/nginx/naxsi.rules
  29. }
  30. #location ~ ^(.*)$ {
  31. location ~ \.php$ {
  32. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  33. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini (No settings!)
  34. # With php-cgi alone:
  35. #fastcgi_pass web-php7_swoole:9000;
  36. fastcgi_pass web-php7:9000;
  37. #fastcgi_pass web-php5:9000;
  38. # With php-fpm:
  39. #fastcgi_pass unix:/var/run/php7-fpm.sock;
  40. fastcgi_index index.php;
  41. fastcgi_param SCRIPT_FILENAME $rootdir/$fastcgi_script_name;
  42. #fastcgi_param PATH_INFO $fastcgi_path_info;
  43. include fastcgi_params;
  44. }
  45. }