Страница 1 из 1

Не работает laravel 5.2 на чистом nginx 1.14

Добавлено: 23 фев 2019, 22:26
denisflen
Добрый день.
Столкнулся с проблемой.
В OS 5.2.9 сайт на laravel 5.2 работает на связке Apache+PHP-7-x64+Nginx-1.14 и PHP-7.0-x64, но не работает на чистом Nginx-1.14 и PHP-7.0-x64.

nginx -t:
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2019/02/23 22:18:48 [emerg] 8848#1820: CreateFile() "d:\webservers\home\domain.loc\www/conf/nginx.conf" failed (3: The system cannot find the path specified)
nginx: configuration file d:\webservers\home\domain.loc\www/conf/nginx.conf test failed
Логи nginx:
2019/02/23 21:50:33 [error] 7792#7100: *54 CreateFile() "d:/webservers/home/domain.loc/www/public/test" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: domain.loc, request: "GET /test HTTP/1.1", host: "domain.loc"
Пожалуйста, подскажите как решить?
Благодарю.

Re: Не работает laravel 5.2 на чистом nginx 1.14

Добавлено: 23 фев 2019, 23:24
denisflen
Решение:
1. Настроить домен в Настройки => вкладка "Домены"
domain.loc => /domain.loc/www/public
2. Скопировать файл ospanel/userdata/config/Nginx-1.14_vhost.conf в папку home/domain.loc/www/public

3. Изменить секцию в /domain.loc/www/public/Nginx-1.14_vhost.conf
    
    location / {
        root       "%hostdir%";
        index      index.php index.html index.htm;
	try_files $uri $uri/ /index.php?$query_string;
    }
4. Перезапустить сервер