@jangot

Почему не перекрывается root в nginx?

есть довольно простой конфиг для NGINX
server {
        listen 443;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
        ssl_session_cache   shared:SSL:10m;
        ssl_session_timeout 10m;
        ssl on;
        ssl_certificate /var/www/certificate/SSL.crt;
        ssl_certificate_key /var/www/certificate/mydomain.com.key;

        root /var/www/mydomain.com;
        index index.html index.htm index.php;

        error_log /var/www/error.log;

        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        }

        location /front/ {
                root /home/someuser/front/deploy/current/public/;
                try_files /$uri /dist/index.html;
        }

Запрос https://maydomain.com/front возвращает 404
Я предполагал, что поиск будет производиться в папке /home/someuser/front/deploy/current/public. Но в логах написано:
2016/02/13 20:11:52 [error] 20775#0: *18 open() "/var/www/mydomain.com/dist/index.html" failed (2: No such file ordirectory), client: ***.***.***.***, server: , request: "GET /front/ HTTP/1.1", host: "mydomain.com"


Я пробовал вместо root писать alias, но результат тот-же.
Почему не перекрывается основной root?
  • Вопрос задан
  • 153 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы