Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen *:80;
- server_name .map.by;
- access_log /var/log/nginx/access.log;
- root /home/mapby/www/web;
- index index.php index.html index.htm;
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9090
- #
- if ($host = 'gomel.map.by' ) {
- rewrite ^/(.*)$ http://map.by/%D0%93%D0%BE%D0%BC%D0%B5%D0%BB%D1%8C$1 permanent;
- }
- location / {
- rewrite "^/minsk_anons/[0-9]{2,4}[0-9]{1,2}[0-9]{1,2}_([0-9]+)\.html$" /834a74fe95a05a05a95d7cfaec9cc494.php;
- rewrite ^/news/(.*)\.htm$ /news/$1.html redirect;
- index index.php;
- try_files $uri /index.php?$args;
- }
- location /js {
- gzip on;
- gzip_http_version 1.1;
- gzip_vary on;
- gzip_comp_level 6;
- gzip_proxied any;
- gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
- # make sure gzip does not lose large gzipped js or css files
- # see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl
- gzip_buffers 16 8k;
- # Disable gzip for certain browsers.
- gzip_disable "MSIE [1-6].(?!.*SV1)";
- }
- location /css {
- gzip on;
- gzip_http_version 1.1;
- gzip_vary on;
- gzip_comp_level 6;
- gzip_proxied any;
- gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
- # make sure gzip does not lose large gzipped js or css files
- # see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl
- gzip_buffers 16 8k;
- # Disable gzip for certain browsers.
- gzip_disable "MSIE [1-6].(?!.*SV1)";
- }
- location ^~ /backend.php {
- include fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /home/mapby/www/web$fastcgi_script_name;
- fastcgi_param HTTPS off;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_cache off;
- try_files $uri /backend.php?$args;
- }
- location ~ \.php$ {
- include fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /home/mapby/www/web$fastcgi_script_name;
- fastcgi_param HTTPS off;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_pass_header "Set-Cookie";
- fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
- fastcgi_cache_key "$server_addr:$server_port$request_uri|$cookie_phpsessid|$cookie_symfony|$cookie_OAID";
- fastcgi_cache fastcgi_cache;
- fastcgi_temp_path /var/cache/nginx/ 1 2;
- fastcgi_cache_use_stale updating error timeout invalid_header http_500;
- fastcgi_cache_valid 120s;
- }
- location ^~ /frontend_dev.php/ {
- try_files $uri /frontend_dev.php?$args;
- }
- location ^~ /cabinet.php/ {
- try_files $uri /cabinet.php?$args;
- }
- location ^~ /cabinet_dev.php/ {
- try_files $uri /cabinet_dev.php?$args;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement