Anyone give me a lift on this one?
Laravel Forge - Nginx respond on IP
I have been using Forge for some time, with my servers behind a load balancer (Digital Ocean). DO is currently configured to do a simple check of port 80 using TCP. This detects if the server is online and nginx running, but not if php-fpm is up or whether there is database connectivity etc.
I'd like to change this to do health checks via HTTP, that way I can make some simple checks of the server and return a 200 if all is good and keep the server in the pool.
It seems when I try and access the Forge server via IP (rather than domain), i get a nginx 404, which causes DO to remove the server from the pool as its expecting a 200. Can anyone help me configure a new site in nginx that would respond on IP and load a simple php script in a given path eg /var/www/html
Any help appreciated.
Elliot
I don't know how to do it off the bat, but if you spin up a new server and look at the default site that will answer on the ip so you should be able to look at that nginx file. I have removed all my default sites so I can't currently look.
Please or to participate in this conversation.