# redirect from non-www to www
# uncomment, save file and restart Nginx to enable
#server {
# listen 80;
# server_name yplaza.net;
# return 301 $scheme://www.yplaza.net$request_uri;
# }
server {
listen 80;
server_name yplaza.net *.yplaza.net;
return 301 https://$host$request_uri$is_args$args;
}
server {
#server_name yplaza.net www.yplaza.net;
listen 443 ssl spdy;
server_name yplaza.net www.yplaza.net;
ssl_certificate /usr/local/nginx/conf/ssl/yplazanet/ssl-unified.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/yplazanet/ssl.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
ssl_prefer_server_ciphers on;
add_header Alternate-Protocol 443:npn-spdy/3;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
#add_header X-Content-Type-Options "nosniff";
#add_header X-Frame-Options DENY;
# nginx 1.5.9+ or higher
# http://nginx.org/en/docs/http/ngx_http_spdy_module.html#spdy_headers_comp
# http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size
# spdy_headers_comp 0;
# ssl_buffer_size 4k;
# enable ocsp stapling
resolver 8.8.8.8;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /usr/local/nginx/conf/ssl/yplazanet/ssl-trusted.crt;
# ngx_pagespeed & ngx_pagespeed handler
#include /usr/local/nginx/conf/pagespeed.conf;
#include /usr/local/nginx/conf/pagespeedhandler.conf;
#include /usr/local/nginx/conf/pagespeedstatslog.conf;
# limit_conn limit_per_ip 16;
# ssi on;
access_log /home/nginx/domains/yplaza.net/log/access.log combined buffer=32k;
error_log /home/nginx/domains/yplaza.net/log/error.log;
root /home/nginx/domains/yplaza.net/public/under_costruction;
#location / {
# block common exploits, sql injections etc
#include /usr/local/nginx/conf/block.conf;
# Enables directory listings when index file not found
#autoindex on;
# Shows file listing times as local time
#autoindex_localtime on;
# Enable for vBulletin usage WITHOUT vbSEO installed
#try_files $uri $uri/ /index.php;
#}
location / {
rewrite ^ http://fifaplaza.net;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}
location /internal_data/ {
internal;
allow 127.0.0.1;
deny all;
}
location /library/ {
internal;
allow 127.0.0.1;
deny all;
}
# Pass PHP scripts to PHP-FPM
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
}
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
#include /usr/local/nginx/conf/errorpage.conf;
}
server {
listen 443 ssl;
server_name fifa.yplaza.net;
location /forum {
rewrite ^ http://fifaplaza.net$request_uri? permanent;
}
root /home/nginx/domains/yplaza.net/public;
location / {
rewrite ^ http://www.fifaplaza.net/forum/$request_uri? permanent;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}
location /internal_data/ {
internal;
allow 127.0.0.1;
deny all;
}
location /library/ {
internal;
allow 127.0.0.1;
deny all;
}
# Pass PHP scripts to PHP-FPM
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
}
}
server {
listen 443 ssl;
server_name forums.yplaza.net;
root /home/nginx/domains/yplaza.net/public/under_costruction;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}
location /internal_data/ {
internal;
allow 127.0.0.1;
deny all;
}
location /library/ {
internal;
allow 127.0.0.1;
deny all;
}
# Pass PHP scripts to PHP-FPM
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
}
}
server {
listen 443 ssl;
server_name cdn.yplaza.net;
root /home/nginx/domains/yplaza.net/public;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}
location /internal_data/ {
internal;
allow 127.0.0.1;
deny all;
}
location /library/ {
internal;
allow 127.0.0.1;
deny all;
}
# Pass PHP scripts to PHP-FPM
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
}
}