Guest User

Untitled

a guest
Aug 4th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. server {
  2. server_name openw3.com www.openw3.com;
  3. listen 23.239.29.5;
  4. listen [2600:3c00::f03c:91ff:fe08:149b];
  5. root /home/openw3/public_html;
  6. index index.html index.htm index.php;
  7. access_log /var/log/virtualmin/openw3.com_access_log;
  8. error_log /var/log/virtualmin/openw3.com_error_log;
  9. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  10. fastcgi_param SERVER_SOFTWARE nginx;
  11. fastcgi_param QUERY_STRING $query_string;
  12. fastcgi_param REQUEST_METHOD $request_method;
  13. fastcgi_param CONTENT_TYPE $content_type;
  14. fastcgi_param CONTENT_LENGTH $content_length;
  15. fastcgi_param SCRIPT_FILENAME /home/openw3/public_html$fastcgi_script_name;
  16. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  17. fastcgi_param REQUEST_URI $request_uri;
  18. fastcgi_param DOCUMENT_URI $document_uri;
  19. fastcgi_param DOCUMENT_ROOT /home/openw3/public_html;
  20. fastcgi_param SERVER_PROTOCOL $server_protocol;
  21. fastcgi_param REMOTE_ADDR $remote_addr;
  22. fastcgi_param REMOTE_PORT $remote_port;
  23. fastcgi_param SERVER_ADDR $server_addr;
  24. fastcgi_param SERVER_PORT $server_port;
  25. fastcgi_param SERVER_NAME $server_name;
  26. fastcgi_param HTTPS $https;
  27. location ~ \.php$ {
  28. try_files $uri =404;
  29. fastcgi_pass unix:/var/php-nginx/145599871331844.sock/socket;
  30.  
  31. }
  32. listen 23.239.29.5:443 ssl;
  33. ssl_certificate /home/openw3/ssl.cert;
  34. ssl_certificate_key /home/openw3/ssl.key;
  35. index index.php index.cgi index.pl index.html index.xhtml index.htm index.shtml;
  36. try_files $uri $uri/ /index.php?$args;
  37. listen [::];
  38. fastcgi_read_timeout 360;
  39. client_max_body_size 2000M;
  40.  
  41. server_tokens off;
  42. location ~* \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
  43. expires 365d;
  44.  
  45. }
  46.  
  47. location / {
  48. if ($http_origin) {
  49. add_header 'Access-Control-Allow-Origin' 'http://openspeedtest.com';
  50. add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
  51.  
  52. }
  53. if ($request_method = OPTIONS ) {
  54. add_header Access-Control-Allow-Credentials "true";
  55. add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With';
  56. add_header Access-Control-Allow-Origin "http://openspeedtest.com";
  57. add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
  58. return 204;
  59. }
  60. }
  61. ssl off;
  62. }
Add Comment
Please, Sign In to add comment