Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. root
  2. admin
  3. v1
  4. assets
  5. css
  6. vt.css
  7. img
  8. logo.png
  9. js
  10. vt.js
  11. lib
  12. app
  13. security.php
  14. sys
  15. network.php
  16. channels
  17. channel
  18. session.php
  19. payments
  20. payment.php
  21. refund.php
  22. config.php
  23. index.php
  24. v2
  25. assets
  26. css
  27. vt.css
  28. img
  29. logo.png
  30. js
  31. vt.js
  32. lib
  33. app
  34. security.php
  35. sys
  36. network.php
  37. channels
  38. channel
  39. session.php
  40. payments
  41. payment.php
  42. refund.php
  43. config.php
  44. index.php
  45.  
  46. map $request_uri $version {
  47. default '';
  48. ~^(?<ver>/vd+) $ver;
  49. }
  50.  
  51. server {
  52. listen 80;
  53. server_name www.site.com;
  54.  
  55. return 301 https://$server_name$request_uri;
  56. }
  57.  
  58. server {
  59. listen 443;
  60. server_name www.site.com;
  61.  
  62. ssl on;
  63. ssl_certificate /etc/ssl/nginx/fxc.im.chained.crt;
  64. ssl_certificate_key /etc/ssl/nginx/fxc.im.key;
  65.  
  66. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  67. ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM;
  68. ssl_prefer_server_ciphers on;
  69. ssl_session_cache shared:SSL:10m;
  70. ssl_session_timeout 1m;
  71.  
  72. if ($request_method !~ ^(OPTIONS|GET|POST|PUT|DELETE)$ ) {
  73. return 444;
  74. }
  75.  
  76. root /var/www/html/api$version;
  77. index index.php;
  78.  
  79. error_log /var/www/logs/api/error.log debug;
  80. access_log /var/www/logs/api/access.log;
  81.  
  82. location ~ ^/vd+ {
  83. rewrite ^/vd+(.*) $1 last;
  84. }
  85.  
  86. location ~ /assets {
  87. autoindex on;
  88. }
  89.  
  90. location ~ .php {
  91. fastcgi_split_path_info ^(.+?.php)/?(.*)$;
  92. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  93.  
  94. if (!-f $document_root$fastcgi_script_name) {
  95. return 404;
  96. }
  97.  
  98. fastcgi_pass unix:/var/run/php5-fpm.sock;
  99. fastcgi_index index.php;
  100.  
  101. fastcgi_intercept_errors on;
  102.  
  103. fastcgi_buffer_size 128k;
  104. fastcgi_buffers 254 16k;
  105. fastcgi_busy_buffers_size 256k;
  106. fastcgi_temp_file_write_size 256k;
  107.  
  108. include fastcgi_params;
  109. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  110. fastcgi_param PATH_INFO $fastcgi_path_info;
  111. fastcgi_param VERSION $version;
  112. fastcgi_param ENVIRONMENT dev;
  113. }
  114.  
  115. location ~ / {
  116. add_header 'Access-Control-Allow-Origin' "$http_origin";
  117. if (!-x $uri) {
  118. rewrite (.*) /index.php$1 last;
  119. }
  120. try_files $uri $uri/ =404;
  121. }
  122. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement