Substitua seu conteúdo de arquivo completo existente pelo seguinte quando relatar o que nginx -t
diz, se você ainda não conseguir reload
.
# Redirect ALL non-https traffic to https
server {
server_name pingrglobe.com *.pingrglobe.com;
return 301 https://$server_name$request_uri;
}
# Redirect www to non-www
server {
listen 443 ssl;
server_name www.pingrglobe.com;
return 301 $scheme://pingrglobe.com$request_uri;
}
server {
listen 443 ssl;
server_name pingrglobe.com;
ssl_certificate ssl/pingrglobe.crt;
ssl_certificate_key ssl/pingrglobe.key;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
root /var/www/pingrglobe.com;
index index.php index.html;
location / {
location ~ /\. {
return 403;
}
add_header Access-Control-Allow-Origin *;
rewrite ^/blog/blogpost/(.+)$ /blog/blogpost?post=$1 last;
rewrite ^/viewticket/(.+)/(.*)$ /viewticket?tid=$1&$2 last;
rewrite ^/vemail/(.+)$ /vemail?eid=$1 last;
rewrite ^/serversettings/(.+)$ /serversettings?srvid=$1 last;
rewrite ^/notification/(.+)$ /notification?id=$1 last;
rewrite ^/viewreport/(.+)$ /viewreport?srvid=$1 last;
rewrite ^/removeserver/(.+)$ /removeserver?srvid=$1 last;
rewrite ^/staffviewticket/(.+)/(.*)$ /staffviewticket?tid=$1&$2 last;
rewrite ^/activate/(.*)/(.*)/(.*)$ /activate?user=$1&code=$2&email=$3 last;
rewrite ^/activate2/(.*)/(.*)/(.*)$ /activate2?user=$1&code=$2&email=$3 last;
rewrite ^/passwordtoken/(.+)/(.*)/(.*)$ /passwordtoken?user=$1&token=$2&email=$3 last;
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
}
try_files $uri $uri/ @extensionless-php;
}
# The try_files directive in the php block mitigates security risks.
location @extensionless-php {
rewrite ^(.*)$ $1.php last;
}
}