R
R
Ruslan Absalyamov2019-02-23 10:24:23
Nginx
Ruslan Absalyamov, 2019-02-23 10:24:23

Why is my site not showing up?

I'm not getting the site I want. In doing so, I correctly specified the path. When starting nginx, I have no problem, there is nothing in the error logs either, except for the entry 2019/02/23 10:11:14 [notice] 30322#30322: signal process started.
My configuration is like from documentation https://www.yiiframework.com/doc/guide/2.0/en/star...
sudo gedit /etc/nginx/sites-available/kma.biz

server {
    charset utf-8;
    client_max_body_size 128M;

    listen 80; ## listen for ipv4

    server_name kma.biz;
    root        /home/ruslan/Development/test_kma.biz/web;
    index       index.php;

    access_log  /home/ruslan/Development/test_kma.biz/vagrant/nginx/log/yii2basic.error.log;
    error_log   /home/ruslan/Development/test_kma.biz/vagrant/nginx/log/yii2basic.access.log;

    location / {
        # Перенаправляем все запросы к несуществующим директориям и файлам на index.php
        try_files $uri $uri/ /index.php?$args;
    }

    # раскомментируйте строки ниже во избежание обработки Yii обращений к несуществующим статическим файлам
    location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
        try_files $uri =404;
    }
    #error_page 404 /404.html;

    location ~ \.php$ {
        include fastcgi.conf;
        #fastcgi_pass   127.0.0.1:9000;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
    }

    location ~ /\.(ht|svn|git) {
        deny all;
    }
}

And made a symbolic link. Only it is somehow highlighted differently
sudo ln -s /etc/nginx/sites-available/kma.biz /etc/nginx/sites-enabled/
5c70f4b347a1e625726235.png
And wrote to hosts
127.0.0.1 kma.biz
And restarted nginx sudo nginx -s status
But the wrong site opens which I need. Why is that?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question