I downloaded Laravel with Reverb on my local server and everything is working perfectly.
but laravel reverb dont work without php artisan reverb:start
in production envirement .. should i run php artisan reverb:start
to make it work ?
this is my nginx setup
server {
server_name domain.com;
root /path/to/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ .php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_hide_header X-Powered-By;
}
location ~ /.(?!well-known).* {
deny all;
}
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;
}
{{certbot cert}}
}
{{certbot cert}}
2
Answers
If the server is running Linux, the solution is to create a supervisor.
Create supervisor
Put this code :
Run this commands:
Note : You can name the file
laravel-reverb
whatever you want.I did the configuration but, is not working here.
Could you show the .env configuration please?
Thank you.