I was running a Litespeed server. I created a virtual host for my next.js app and two listeners, one for http and another for https linked with my virtual host. I run my next.js from a server.js file as a startup file in virtual host context config.
The virtual host was running on https port and I could access this via web explorer. Now, I restarted the virtualhost and only get error 500 Request Timeout.
I am not used to debug litespeed server, the only info I could get was this logs (from tail /usr/local/lsws/logs/error.log
) (MA-web is the name of the VH):
I had my package.json file like this:
I use 'start' script to run app from server.js file, after executing 'build' script. The problem is that Litespeed Virtual Host Context only exexutes the file, without doing the build, but it doesn't appear as stopped.
So, the solution for me was executing 'build' script before restarting the server.