Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MYAPP:512m inactive=180m;
- fastcgi_cache_key "$scheme$request_method$remote_addr$request_uri";
- server {
- server_name openspeedtest.com www.openspeedtest.com 23.239.29.5;
- listen 23.239.29.5 default_server;
- listen [2600:3c00::f03c:91ff:fe08:149b] default_server;
- root /home/openspeedtest/public_html;
- index index.html index.htm index.php;
- access_log /var/log/virtualmin/openspeedtest.com_access_log;
- error_log /var/log/virtualmin/openspeedtest.com_error_log;
- fastcgi_param GATEWAY_INTERFACE CGI/1.1;
- fastcgi_param SERVER_SOFTWARE nginx;
- fastcgi_param QUERY_STRING $query_string;
- fastcgi_param REQUEST_METHOD $request_method;
- fastcgi_param CONTENT_TYPE $content_type;
- fastcgi_param CONTENT_LENGTH $content_length;
- fastcgi_param SCRIPT_FILENAME /home/openspeedtest/public_html$fastcgi_script_name;
- fastcgi_param SCRIPT_NAME $fastcgi_script_name;
- fastcgi_param REQUEST_URI $request_uri;
- fastcgi_param DOCUMENT_URI $document_uri;
- fastcgi_param DOCUMENT_ROOT /home/openspeedtest/public_html;
- fastcgi_param SERVER_PROTOCOL $server_protocol;
- fastcgi_param REMOTE_ADDR $remote_addr;
- fastcgi_param REMOTE_PORT $remote_port;
- fastcgi_param SERVER_ADDR $server_addr;
- fastcgi_param SERVER_PORT $server_port;
- fastcgi_param SERVER_NAME $server_name;
- fastcgi_param HTTPS $https;
- location ~ \.php$ {
- fastcgi_cache MYAPP;
- fastcgi_cache_valid 200 180m;
- try_files $uri =404;
- fastcgi_pass unix:/var/php-nginx/145599868231392.sock/socket;
- }
- listen 23.239.29.5:443 default_server ssl;
- listen [2600:3c00::f03c:91ff:fe08:149b]:443 default_server ssl;
- ssl_certificate /home/openspeedtest/ssl.cert;
- ssl_certificate_key /home/openspeedtest/ssl.key;
- error_page 405 =200 $uri;
- error_page 404 /404.php;
- if ($http_host = www.openspeedtest.com) {
- rewrite (.*) http://openspeedtest.com$1 permanent;
- }
- fastcgi_read_timeout 360;
- client_max_body_size 2000M;
- listen [::];
- access_log off;
- error_log /dev/null;
- log_not_found off;
- server_tokens off;
- 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)$ {
- expires 365d;
- }
- location / {
- if ($http_origin) {
- add_header 'Access-Control-Allow-Origin' 'http://openspeedtest.com';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
- }
- if ($request_method = OPTIONS ) {
- add_header Access-Control-Allow-Credentials "true";
- 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';
- add_header Access-Control-Allow-Origin "http://openspeedtest.com";
- add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
- return 204;
- }
- }
- location /results {
- # index index.php index.html;
- # send url to index.php and append the requested uri to the end unless the file/directory exists
- #if (!-e $request_filename){
- #rewrite ^/finalversion/results/(.*)$ finalversion/results/?r=/$1? last;
- #rewrite ^/finalversion/results/([a-zA-Z0-9/-]+).html/?$ /index.php?r=$1 last;
- rewrite ^/results/(.*)$ /results/index.php?r=$1 last;
- #}
- }
- }
Add Comment
Please, Sign In to add comment