Table of Contents as of 2018-10-12
Basic Example:
<IfModule mod_ssl.c>
<VirtualHost *:8080>
# the ptoxy shit
ProxyPreserveHost On
ProxyPass "/" "http://localhost:3000/"
ProxyPassReverse "/" "http://localhost:3000/"
ServerName www.sub.domain.com
# SSL Support
SSLCertificateFile /etc/letsencrypt/live/sub.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/sub.domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Enable this mods:
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests
... and don't forget to make Apache listen to the desired port, in this example port: 8080
apache docs
redis-cli KEYS *YOUR_KEY_PREFIX* | xargs redis-cli DEL
What I have done in a similar situation (I have shared cpanel hosting and no way to install supervisor) I used the cron to run laravel's scheduler every minute and inside I used this:
$schedule->command('queue:work --daemon')->everyMinute()->withoutOverlapping();
So whats happening is, the first time it runs, it will start the queue worker in daemon mode, then on every minute it will basically use the withoutOverlapping to only run it again if the previous one crashed/exited/no longer running. This essentially produces a supervisor like functionality. At worst case it will take a minute before the queue worker comes back up in case of a failure / memory limit hit, but in most cases the first thread will stay alive and work through the queue. This is a better way to accomplish queue:listen like functionality without supervisor.
The caveat is of course, you need to run queue:restart whenever you deploy new code so that the daemon worker will restart and get fresh app code.
Hope this helps.