Nginx not running with no error message
#!/bin/sh
echo "start"
rm /etc/nginx/sites-enabled/default
ln -s /primerbean/nginx_conf/healthbean_nginx.conf /etc/nginx/sites-enabled/
/etc/init.d/nginx start
echo `service nginx status`
echo `service apache2 status`
service nginx restart
echo `service nginx status`
cat /var/log/nginx/error.log
uwsgi --ini /primerbean/nginx_conf/healthbean_uwsgi.ini
# migrate db, so we have the latest db schema
# python manage.py migrate
# start development server on public ip interface, on port 8000
# python manage.py runserver 0.0.0.0:8000
up vote56down votefavorite 19 |
I am trying to start my nginx server. When I type "$> /etc/init.d/nginx start", I have a message appearing "Starting nginx:", and then nothing happens. There is no error message, and when I check the status of nginx I see that it is not running. Here is my /etc/nginx/nginx.conf file:
} And here is my /etc/nginx/sites-available/default file :
|
||||||||||||||||||||
|
8 Answers
up vote174down vote |
First, always I ran into the same problem. The reason I had the issue was twofold. First, I had accidentally copied a log file into my site-enabled folder. I deleted the log file and made sure that all the files in sites-enabled were proper nginx site configs. I also noticed two of my virtual hosts were listening for the same domain. So I made sure that each of my virtual hosts had unique domain names.
Then it worked.
|
||||||||||||
|
up vote8down vote |
You should probably check for errors in In my case I did no add the port for ipv6. You should also do this (in case you are running nginx on a port other than 80):
|
||
add a comment |
up vote4down vote |
In your
And probably the path you are using is:
Notice the missing s in site.
|
|||
add a comment |
up vote3down vote |
Check the daemon option in nginx.conf file. It has to be ON. Or you can simply rip out this line from config file. This option is fully described here http://nginx.org/en/docs/ngx_core_module.html#daemon
|
||||
|
up vote1down vote |
1. Check for your configuration files by running the aforementioned command: 2. Check for port conflicts. For instance, if apache2 (
|
||
add a comment |
up vote1down vote |
One case you check that nginx hold on 80 number port in system by default , check if you have any server like as apache or anything exist on system that block 80 number port thats the problem occurred. 1 .You change port number on nginx by this way,
Change 80 to 81 or anything,
Hope that will work
|
||
add a comment |
up vote0down vote |
I had the exact same problem with my instance. My problem was that I forgot to allow port 80 access to the server. Maybe that‘s your issue as well? Check with your WHM and make sure that port is open for the IP address of your site,
|
||
add a comment |
up vote0down vote |
For what it‘s worth: I just had the same problem, after editing the Finally, I logged in as root (
|
||
add a comment |