Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 5.45.72.16:80;
- # listen 5.45.72.16:443 ssl;
- server_name ~^www\.(.*)$;
- return 301 $scheme://$1$request_uri;
- }
- server {
- # listen 5.45.72.16:80;
- listen 5.45.77.183:80;
- #listen 5.45.72.16:443 ssl;
- server_name ya888ya.net ya-888-ya.com;
- charset UTF-8;
- disable_symlinks if_not_owner from=$root_path;
- index index.html index.php;
- root $root_path;
- set $root_path /var/www/ya8/data/www/ya888ya.org;
- ssi on;
- access_log /var/www/httpd-logs/ya888ya.org.access.log;
- error_log /var/www/httpd-logs/ya888ya.org.error.log notice;
- #*** Lock request by user agent
- # if ($http_user_agent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36" ) {
- # return 403;
- # }
- location / {
- #Блокировка город/страна - файл geomap.conf
- if ($allowed_country = no) {
- return 403;
- }
- if ($allowed_city = no) {
- return 403;
- }
- #Открытие доступа игрокам из Крыма
- if ($crimea_city = yes) {
- set $geoip2_data_country_code RU;
- }
- # First attempt to serve request as file, then
- # as directory, then fall back to index.html
- #rewrite ^/(games/slots)$ / redirect;
- #try_files $uri $uri/ /index.html;
- expires off;
- # try_files $uri $uri/ @kohana;
- try_files $uri /index.php?$query_string;
- # add_header CFF_COUNTRY "$geoip2_data_country_code";
- #504 error recovering
- proxy_read_timeout 300;
- # Uncomment to enable naxsi on this location
- # include /etc/nginx/naxsi.rules
- }
- location /country
- {
- # default_type text/html;
- # default_type application/vnd.maxmind.com-country+json;
- # add_header X-uri "$geoip2_data_country_code";
- # add_header X-uri "$geoip2_data_country_code";
- add_header CF_COUNTRY "$geoip2_data_country_code";
- # add_header CF_CITY "$geoip2_data_city_name";
- return 200 "$geoip2_data_country_code";
- # return 200 "$geoip2_data_city_name";
- }
- #подгрузка картинок из seo.orionlab.ru на проекты со скрытием домена
- location ^~ /uploads {
- try_files $uri $uri/ /seo_uploads$uri;
- }
- location ^~ /seo_uploads {
- proxy_pass http://seo.orionlab.ru/;
- proxy_redirect http://seo.orionlab.ru/ /;
- }
- location /data.json {
- rewrite ^(.*)$ /media/lobby/data.json redirect;
- }
- location /windows.swf {
- rewrite ^(.*)$ /media/lobby/windows.swf redirect;
- }
- location /lobby.swf {
- rewrite ^(.*)$ /media/lobby/lobby.swf redirect;
- }
- location /menu.swf {
- rewrite ^(.*)$ /media/lobby/menu.swf redirect;
- }
- location /player/logout.json {
- rewrite ^(.*)$ /media/lobby/player/logout.json redirect;
- }
- location @kohana {
- rewrite ^/(.+)$ /index.php$request_uri last;
- }
- # Don't log robots.txt or favicon.ico files
- location = /favicon.ico { log_not_found off; access_log off; }
- location = /robots.txt {
- # rewrite ^(.*)$ /index.php/$0 break;
- access_log off;
- log_not_found off;
- try_files $uri @kohana;
- }
- # 404 errors handled by our application, for instance Laravel or CodeIgniter
- error_page 404 /index.php;
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- location ~ \.php$ {
- try_files $uri $uri/ @kohana;
- #fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_pass 127.0.0.1:9000;
- #fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- include fastcgi_params;
- # added for kohana
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- #Симуляция передачи заголовка Geoip от Cloudflare
- fastcgi_param HTTP_CF_IPCOUNTRY "$geoip2_data_country_code";
- fastcgi_param KOHANA_ENV production;
- fastcgi_cache off;
- #504 error recovering
- fastcgi_read_timeout 180;
- # With php5-cgi alone:
- # fastcgi_pass 127.0.0.1:9000;
- # With php5-fpm:
- fastcgi_index index.php;
- }
- # Deny access to files starting with dot (.htaccess, .svn, etc)
- location ~ /\. {
- deny all;
- }
- # Set the cache for static contents
- location ~* \.(gif|jpg|png|svg|tiff|pdf|ico)$ {
- expires 30d;
- }
- }
- # SSL config
- server {
- # listen 5.45.72.16:80;
- # listen 5.45.72.16:443 ssl;
- listen 5.45.76.236:80;
- listen 5.45.76.236:443 ssl;
- listen 5.45.72.45:80;
- server_name ya888ya.org ya888ya.win www.ya888ya.win ru.ya888ya.win;
- auth_basic "Access limited by ISPmanager";
- auth_basic_user_file /var/www/ad7/data/etc/access.v7-2.orionlab.ru.1B2M2Y8A.passwd;
- charset UTF-8;
- disable_symlinks if_not_owner from=$root_path;
- index index.html index.php;
- root $root_path;
- set $root_path /var/www/ya8/data/www/ya888ya.org;
- ssi on;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- 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-SHA256:AES256-SHA256: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';
- ssl_dhparam /var/www/httpd-cert/dhgroup/dhparams_ya888ya.pem;
- # Принудительный https
- # if ( $scheme = "http" ) {
- # rewrite ^/(.*)$ https://$host/$1 permanent;
- # }
- if ($host = ya888ya.org) {
- return 301 $scheme://ru.ya888ya.win;
- }
- if ($host = ya888ya.win) {
- return 302 $scheme://www.ya888ya.win;
- }
- if ($host = www.ya888ya.win) {
- return 302 $scheme://ru.ya888ya.win;
- }
- access_log /var/www/httpd-logs/ya888ya.org.access.log;
- error_log /var/www/httpd-logs/ya888ya.org.error.log notice;
- #*** Lock request by user agent
- # if ($http_user_agent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36" ) {
- # return 403;
- # }
- location / {
- #Блокировка город/страна - файл geomap.conf
- if ($allowed_country = no) {
- return 403;
- }
- if ($allowed_city = no) {
- return 403;
- }
- #Открытие доступа игрокам из Крыма
- if ($crimea_city = yes) {
- set $geoip2_data_country_code RU;
- }
- # First attempt to serve request as file, then
- # as directory, then fall back to index.html
- #rewrite ^/(games/slots)$ / redirect;
- #try_files $uri $uri/ /index.html;
- expires off;
- # try_files $uri $uri/ @kohana;
- try_files $uri /index.php?$query_string;
- #504 error recovering
- proxy_read_timeout 300;
- # Uncomment to enable naxsi on this location
- # include /etc/nginx/naxsi.rules
- }
- #подгрузка картинок из seo.orionlab.ru на проекты со скрытием домена
- location ^~ /uploads {
- try_files $uri $uri/ /seo_uploads$uri;
- }
- location ^~ /seo_uploads {
- proxy_pass http://seo.orionlab.ru/;
- proxy_redirect http://seo.orionlab.ru/ /;
- }
- location /data.json {
- rewrite ^(.*)$ /media/lobby/data.json redirect;
- }
- location /windows.swf {
- rewrite ^(.*)$ /media/lobby/windows.swf redirect;
- }
- location /lobby.swf {
- rewrite ^(.*)$ /media/lobby/lobby.swf redirect;
- }
- location /menu.swf {
- rewrite ^(.*)$ /media/lobby/menu.swf redirect;
- }
- location /player/logout.json {
- rewrite ^(.*)$ /media/lobby/player/logout.json redirect;
- }
- location @kohana {
- rewrite ^/(.+)$ /index.php$request_uri last;
- }
- # Don't log robots.txt or favicon.ico files
- location = /favicon.ico { log_not_found off; access_log off; }
- location = /robots.txt {
- # rewrite ^(.*)$ /index.php/$0 break;
- access_log off;
- log_not_found off;
- try_files $uri @kohana;
- }
- # 404 errors handled by our application, for instance Laravel or CodeIgniter
- error_page 404 /index.php;
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- location ~ \.php$ {
- try_files $uri $uri/ @kohana;
- #fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_pass 127.0.0.1:9000;
- #fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- include fastcgi_params;
- # added for kohana
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param KOHANA_ENV production;
- #Симуляция передачи заголовка Geoip от Cloudflare
- fastcgi_param HTTP_CF_IPCOUNTRY "$geoip2_data_country_code";
- fastcgi_cache off;
- #504 error recovering
- fastcgi_read_timeout 180;
- # With php5-cgi alone:
- # fastcgi_pass 127.0.0.1:9000;
- # With php5-fpm:
- fastcgi_index index.php;
- }
- # Deny access to files starting with dot (.htaccess, .svn, etc)
- location ~ /\. {
- deny all;
- }
- # Set the cache for static contents
- location ~* \.(gif|jpg|png|svg|tiff|pdf|ico)$ {
- expires 30d;
- }
- ssl_certificate /var/www/httpd-cert/ya8/ya888ya.org_namecheap.crt;
- ssl_certificate_key /var/www/httpd-cert/ya8/ya888ya.org_namecheap.key;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement