Вторая редакция конфига для nginx

28
публикации
server {
        listen 80;
        server_name sitename.ru;
        rewrite ^(.*)$ http://www.sitename.ru$1 permanent;
}
server {
        listen 80;
        server_name www.sitename.ru;
        root /var/www/sitename.ru/www;
        autoindex off;

        rewrite ^(.*/)?([^\.]*[^/])$ $1$2/ permanent;
        rewrite ^(.*\.[^/]*)/$ $1 permanent;

        location = /favicon.ico {}
        location = /robots.txt {}
        location = /capsule/ext/kcaptcha/ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
        }
        location ~ /capsule/ {}
        location ~ /share42/ {}
        location / {
                rewrite ^(.*)$ /index.php;
        }
        location = /index.php {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
        }
        location ~ /\.ht {
                deny all;
        }
}


Tags
#archive 61 #capsulecms 30 #featurerequest 26 #linux 22 #php 13 #windows 12 #phpstorm 8 #eclipse 8 #nginx 5 #bug 5 #oldsite 4 #font 4 #SEO 3 #antipattern 2 #quotes 2 #mvc 2 #nano 2 #strtok 1 #qt 1 #capsulecmsv1 1 #netbeans 1 #iosevka 1 #puntoswitcher 1 #movie 1 #mariadb 1 #foobar 1 #apache 1 #git 1 #pidgin 1 #curl 1 #datetimepicker 1 #rsync 1 #bootstrap 1 #cmd 1 #iconv 1 #cms 1 #skype 1 #pdf 1 #algorithm 1 #composer 1 #copypaste 1 #sourcetree 1 #singleton 1 #mysql 1 #meld 1 #pattern 1 #postgresql 1 #debian 1 #ideas 1