Разворачивание на рабочем сервере
Сайт который помог здесь https://gist.github.com/mshoaibdev/c7e424abd1957ed10c79e446b8fdf041
1. В файл /home/admin/conf/web/your-domain.ru.nginx.ssl.conf добавить
location /app {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header SERVER_PORT $server_port;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://0.0.0.0:8080;
}
2. В .env файл проекта добавить
REVERB_HOST=your-domain.ru
REVERB_PORT=443
REVERB_SCHEME=https
REVERB_SERVER_HOST=127.0.0.1
REVERB_SERVER_PORT=8080
BROADCAST_CONNECTION=reverb
3. Для проверки запустить в консоли reverb
php artisan reverb:start --host=127.0.0.1 --port=8080 --no-interaction --debug
4. Запустить reverb через supervisor без --debug
Создать файл /etc/supervisor/conf.d/your-domain.ru.reverb.conf
[program:your-domain.ru.reverb]
command=php /var/www/your-domain.ru/project/artisan reverb:start --host=127.0.0.1 --port=8080 --no-interaction
autostart=true
autorestart=true
user=root
stderr_logfile=/var/www/your-domain.ru/your-domain.ru.reverb.log
stdout_logfile=/var/www/your-domain.ru/your-domain.ru.reverb-out.log
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start your-domain.ru.reverb
