Guest User

Untitled

a guest
Aug 15th, 2020
76
55 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. location ~ [^/]\.php(/|$) {
  2. include /usr/local/nginx/conf/503include-only.conf;
  3. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  4. if (!-f $document_root$fastcgi_script_name) {
  5. return 404;
  6. }
  7. fastcgi_keep_conn on;
  8. fastcgi_pass dft_php;
  9. #fastcgi_pass 127.0.0.1:9000;
  10. #fastcgi_pass unix:/tmp/php5-fpm.sock;
  11. fastcgi_index index.php;
  12. #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  13. fastcgi_param SCRIPT_FILENAME $request_filename;
  14. #fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;
  15.  
  16. # might shave 200+ ms off PHP requests
  17. # which don't pass on a content length header
  18. # slightly faster page response time at the
  19. # expense of throughput / scalability
  20. #sendfile on;
  21. #tcp_nopush off;
  22. #keepalive_requests 0;
  23.  
  24. fastcgi_connect_timeout 60s;
  25. fastcgi_send_timeout 180s;
  26. fastcgi_read_timeout 300s;
  27. fastcgi_buffer_size 32k;
  28. fastcgi_buffers 512 32k;
  29. fastcgi_busy_buffers_size 1m;
  30. fastcgi_temp_file_write_size 4m;
  31. fastcgi_max_temp_file_size 4m;
  32. fastcgi_intercept_errors off;
  33.  
  34. # next 3 lines when uncommented / enabled
  35. # allow Nginx to handle uploads which then
  36. # passes back the completed upload to PHP
  37. #fastcgi_pass_request_body off;
  38. #client_body_in_file_only clean;
  39. #fastcgi_param REQUEST_BODY_FILE $request_body_file;
  40.  
  41. #new .04+ map method
  42. fastcgi_param HTTPS $server_https;
  43.  
  44. # comment out PATH_TRANSLATED line if /usr/local/lib/php.ini sets following:
  45. # cgi.fix_pathinfo=0
  46. # as of centminmod v1.2.3-eva2000.01 default is set to cgi.fix_pathinfo=1
  47.  
  48. fastcgi_param PATH_INFO $fastcgi_path_info;
  49. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  50.  
  51. fastcgi_param QUERY_STRING $query_string;
  52. fastcgi_param REQUEST_METHOD $request_method;
  53. fastcgi_param CONTENT_TYPE $content_type;
  54. fastcgi_param CONTENT_LENGTH $content_length;
  55.  
  56. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  57. fastcgi_param REQUEST_URI $request_uri;
  58. fastcgi_param DOCUMENT_URI $document_uri;
  59. fastcgi_param DOCUMENT_ROOT $document_root;
  60. fastcgi_param SERVER_PROTOCOL $server_protocol;
  61. fastcgi_param REQUEST_SCHEME $scheme;
  62. fastcgi_param HTTPS $https if_not_empty;
  63. fastcgi_param HTTP_PROXY "";
  64.  
  65. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  66. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  67.  
  68. fastcgi_param REMOTE_ADDR $remote_addr;
  69. fastcgi_param REMOTE_PORT $remote_port;
  70. fastcgi_param SERVER_ADDR $server_addr;
  71. fastcgi_param SERVER_PORT $server_port;
  72. fastcgi_param SERVER_NAME $server_name;
  73.  
  74. # Set php-fpm geoip variables
  75. fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
  76. fastcgi_param GEOIP_COUNTRY_CODE3 $geoip_country_code3;
  77. fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
  78. fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
  79. fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
  80. fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
  81. fastcgi_param GEOIP_REGION $geoip_region;
  82. fastcgi_param GEOIP_CITY $geoip_city;
  83. fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
  84. fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
  85. fastcgi_param GEOIP_LATITUDE $geoip_latitude;
  86. fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
  87.  
  88. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  89. fastcgi_param REDIRECT_STATUS 200;
  90.  
  91. }
RAW Paste Data