Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- #listen 127.0.0.1:3000;
- listen 212.20.30.177:8003;
- server_name info.sibnet.ru;
- access_log /home/mark/work/logs/info.access.log;
- error_log /home/mark/work/logs/info.error.log notice;
- root /home/mark/work/newinfo/web;
- large_client_header_buffers 4 8k;
- location /who_admin/ {
- allow 90.189.192.0/23;
- allow 212.20.30.0/24;
- deny all;
- try_files $uri /app.php$is_args$args;
- }
- location /sibnet-club/ {
- allow 90.189.192.0/23;
- allow 212.20.30.0/24;
- deny all;
- try_files $uri /app.php$is_args$args;
- }
- # 301 редирект с путей index.php на / и index.php?query на /?query
- # http://redmine.sibnet.ru/issues/10334/
- if ($request_uri ~* "^(.*/)index\.php(.*)") {
- return 301 $1$2;
- }
- # 301 редирект с путей app.php на / и app.php?query на /?query
- if ($request_uri ~* "^(.*/)app\.php(.*)") {
- return 301 $1$2;
- }
- # gzip json и отдельный лог статики
- location ~ \.json$ {
- access_log /home/mark/work/logs/info.access.log;
- error_log /home/mark/work/logs/info.error.log notice;
- # нужно для отдачи мобильной погоды
- add_header 'Access-Control-Allow-Origin' '*';
- root /home/mark/work/newinfo/web;
- gzip on;
- gzip_min_length 1000;
- gzip_comp_level 6;
- gzip_proxied no-cache;
- gzip_types application/json;
- }
- # редиректы для совместимости
- location ~ ^(/weather/script_combo.js|/weather/script_combo.css|/weather/img/.*|/images/.*) {
- return 301 /legacy$1;
- }
- # gzip статики
- location ~ \.(xml|css|js)$ {
- access_log /home/mark/work/logs/info.access.log;
- error_log /home/mark/work/logs/info.error.log notice;
- root /home/mark/work/newinfo/web;
- gzip on;
- gzip_min_length 1000;
- gzip_comp_level 6;
- gzip_proxied no-cache;
- gzip_types text/css text/xml text/js text/javascript application/x-javascript application/javascript application/xml;
- add_header Cache-Control "max-age=2629000, public, must-revalidate, proxy-revalidate";
- }
- # symfony ignore dir
- location /legacy {
- location /legacy/static_templates {
- index index.php index.html index.htm;
- }
- }
- # symfony ignore dir
- location /adminjs {
- index index.php index.html index.htm;
- }
- # symfony ignore dir
- location ~ ^/(data|img|js|css|sitemap)/.* {
- }
- # disable access
- location ~ ^/(app_dev|config).php(/|$) {
- return 404;
- }
- # any path over symfony
- location / {
- client_max_body_size 200m;
- try_files $uri /app.php$is_args$args;
- }
- location /what-in-work/ {
- proxy_pass http://192.168.0.211:12801;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- location ~ \.php$ {
- access_log /home/mark/work/logs/info.access.log;
- error_log /home/mark/work/logs/info.error.log notice;
- try_files $uri /app.php$is_args$args;
- # gzip php выдачи
- gzip on;
- gzip_min_length 1000;
- gzip_comp_level 6;
- gzip_proxied no-cache;
- gzip_types text/plain text/css application/x-javascript application/javascript application/json text/xml application/xml application/xml+rss text/javascript;
- # upload size
- client_max_body_size 200m;
- fastcgi_pass unix:/run/php/php5.6-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /home/mark/work/newinfo/web/$fastcgi_script_name;
- fastcgi_param REMOTE_ADDR $remote_addr;
- fastcgi_param X-Real-IP $remote_addr;
- fastcgi_param X_FORWARDED_FOR $proxy_add_x_forwarded_for;
- 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 REQUEST_URI $request_uri;
- fastcgi_param DOCUMENT_ROOT /home/mark/work/newinfo/web;
- fastcgi_param SERVER_NAME info-local.sibnet.ru;
- fastcgi_buffer_size 16k;
- fastcgi_buffers 10 100k;
- fastcgi_intercept_errors on;
- }
- # </GENERATED in attributes/default.rb>
- error_page 500 502 503 504 /50x.html;
- location ~ (status|ping)$ {
- allow 212.20.30.0/24;
- allow 90.189.192.0/23;
- allow 127.0.0.1;
- deny all;
- fastcgi_pass unix:/run/php/php5.6-fpm.sock;
- include fastcgi.conf;
- }
- location ~ /\.ht {
- deny all;
- }
- location ~ /\.svn {
- deny all;
- }
- location ~/\.git {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement