-2

This question already has an answer here:

My Server Working Good... Until Reboot, After Reboot Nginx not Running Good!

OS: Ubuntu server

nginx version: nginx/1.10.0 (Ubuntu)

HHVM Script Server

I Try many Methods But I can't Fix This:

Configuration Has been Ok.

nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Aug 06 16:05:48 HHVM systemd[1]: Starting A high performance web server and a reverse proxy server...
-- Subject: Unit nginx.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has begun starting up.
Aug 06 16:05:48 HHVM nginx[1618]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Aug 06 16:05:49 HHVM nginx[1618]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Aug 06 16:05:49 HHVM nginx[1618]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Aug 06 16:05:50 HHVM nginx[1618]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Aug 06 16:05:50 HHVM nginx[1618]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Aug 06 16:05:51 HHVM nginx[1618]: nginx: [emerg] still could not bind()
Aug 06 16:05:51 HHVM systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 06 16:05:51 HHVM systemd[1]: Failed to start A high performance web server and a reverse proxy server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has failed.
--
-- The result is failed.
Aug 06 16:05:51 HHVM systemd[1]: nginx.service: Unit entered failed state.
Aug 06 16:05:51 HHVM systemd[1]: nginx.service: Failed with result 'exit-code'.

NginX runnig and I see "404 File Not Found" on Web browser,that meaning hhvm not running .

How can i fix it?

marked as duplicate by Iain, Michael Hampton nginx Aug 6 '16 at 18:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

First of all you need to find pid of nginx so that you can kill it. To find pid just type

ps aux | grep nginx

Once you find the pid, you can kill that process like this.

kill -9 <pid>

But the easiest way is to just restart it by using following command:

sudo service nginx restart

or

sudo service nginx stop
sudo service nginx start

Let me know if you need more help.

0

You need to check which process is listening on port 80, and make sure that service is disabled in systemd. You can find the process with netstat -lnp command, looking for port 80 in the output.

Not the answer you're looking for? Browse other questions tagged or ask your own question.