I have nginx installed in /opt/nginx and was installed by Passenger.
I can start it up with
and my rails app runs fine.
I created a systemd service and when using that,
systemctl start nginx
hangs forever, but nginx is started.
Trying to access my website results in an error where rails is complaining that it can’t talk to the database, even though the database is running and I can connect and query it. After a few minutes nginx crashes.
After=syslog.target network.target remote-fs.target nss-lookup.target
ExecReload=/bin/kill -s HUD $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
Am I missing something or have something misconfigured here?
The problem is definitely not ngix or my rails app. I can get a rails console and interact with the database.
/opt/nginx/sbin/nginx -t nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok nginx: configuration file /opt/nginx/conf/nginx.conf test is successful