Всегда пустая страница - PullRequest
0 голосов
/ 05 ноября 2018

Я пытаюсь настроить мой nginx сервер для работы с другими рабочими каталогами по пути uri.

Вот мой конфигурационный файл

server {
    server_name abc.com 

    auth_basic "Restricted Content";
    auth_basic_user_file /etc/nginx/.htpasswd;

    access_log /var/www/abc.com/log/access.log;
    error_log /var/www/abc.com/log/error.log;

    # Add index.php to the list if you are using PHP
    index index.php index.html index.htm;

    #location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
    #   try_files $uri $uri/ =404;
    #}

    location /api {
         root /var/www/abc.com/html/public;
       }

        location / {
         root /var/www/cabinet.client;
       }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

    #   # With php7.0-cgi alone:
    #   fastcgi_pass 127.0.0.1:9000;
        # With php7.0-fpm:
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #   deny all;
    #}

 # managed by Certbot

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/abc.com-0001/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/abc.com-0001/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

Итак, у меня есть клиент 2 репозиториев (Javascript - Vue JS) и серверная сторона (PHP - Laravel Api). Поэтому, когда пользователь запрашивает страницу, я хочу, чтобы html файлы Но когда пользователь отправляет запрос на сервер (путь API начинается с api), я хочу изменить свой код php. Я всегда получаю пустую страницу при попытке посетить abc.com.

Что я сделал не так?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...