Advertisement
Guest User

Untitled

a guest
Jun 17th, 2015
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.11 KB | None | 0 0
  1. server {
  2.     root /home/www/projects/dechko;
  3.     index index.html index.htm index.php;
  4.     server_name mywebsite.project;
  5.     error_page 500 /error500/;
  6.     error_page 404 /error404/;
  7.     location / {
  8.         if ($request_uri ~ "^(.*)polezna_informaciq_statii(.*)$"){
  9.             rewrite ^/(.*)polezna_informaciq_statii(.*)$ /$1biblioteka$2 redirect;
  10.         }
  11.         if ($request_uri ~ "^(.*)polezna_informaciq(.*)$"){
  12.             rewrite ^/(.*)polezna_informaciq(.*)$ /$1biblioteka$2 redirect;
  13.         }
  14.         rewrite ^/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ /index.php?atr1=$1&atr2=$2&atr3=$3&atr4=$4&atr5=$5&atr6=$6&atr7=$7 break;
  15.         rewrite ^/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ /index.php?atr1=$1&atr2=$2&atr3=$3&atr4=$4&atr5=$5&atr6=$6 break;
  16.         rewrite ^/(.*)/(.*)/(.*)/(.*)/(.*)/$ /index.php?atr1=$1&atr2=$2&atr3=$3&atr4=$4&atr5=$5 break;
  17.         rewrite ^/(.*)/(.*)/(.*)/(.*)/$ /index.php?atr1=$1&atr2=$2&atr3=$3&atr4=$4 break;
  18.         rewrite ^/(.*)/(.*)/(.*)/$ /index.php?atr1=$1&atr2=$2&atr3=$3 break;
  19.         rewrite ^/(.*)/(.*)/$ /index.php?atr1=$1&atr2=$2 break;
  20.         rewrite ^/(.*)/$ /index.php?atr1=$1 break;
  21.         fastcgi_index index.php;
  22.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  23.         fastcgi_pass unix:/var/run/php5-fpm.sock;
  24.         include fastcgi_params;
  25.     }
  26.     location /admin/ {
  27.         if (-e $request_filename){
  28.             rewrite ^/admin/(.*)/(.*)/(.*)/(.*)/$ /admin/index.php?atr1=$1&atr2=$2&atr3=$3&atr4=$4 break;
  29.         }
  30.         rewrite ^/admin/(.*)/(.*)/(.*)/$ /admin/index.php?atr1=$1&atr2=$2&atr3=$3 break;
  31.         rewrite ^/admin/(.*)/(.*)/$ /admin/index.php?atr1=$1&atr2=$2 break;
  32.         rewrite ^/admin/(.*)/$ /admin/index.php?atr1=$1 break;
  33.        
  34.         fastcgi_index index.php;
  35.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  36.         fastcgi_pass unix:/var/run/php5-fpm.sock;
  37.         include fastcgi_params;
  38.     }
  39.    
  40.     location ~* \.php$ {
  41.         fastcgi_index index.php;
  42.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  43.         fastcgi_pass unix:/var/run/php5-fpm.sock;
  44.         include fastcgi_params;
  45.     }
  46.    
  47.     location ~* .(jpg|jpeg|png|gif|ico|css|js|woff|ttf)$ {
  48.         sendfile off;
  49.         access_log off;
  50.         expires off;
  51.     }
  52.    
  53.     error_log /var/log/nginx/mywebsite.project.error.log;
  54.     access_log /var/log/nginx/mywebsite.project.access.log;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement