Portal Home > Knowledgebase > Articles Database > nginx fails to start ( centos)


nginx fails to start ( centos)




Posted by elvis1, 04-11-2010, 01:05 PM
Hi guys after installing nginx (under centos) using Slicehost's guideline I get this: sudo /etc/init.d/nginx start audit_log_user_command(): Connection refused Starting nginx: [FAILED] Any idea of what could be causing it? thanks

Posted by linux-image, 04-11-2010, 01:31 PM
Hi Elvis, What OS is this? Is it CentOS? It is probably a kernel problem. The Audit log feature may not be enabled.

Posted by elvis1, 04-11-2010, 01:37 PM
yep centos ..How do I activate the audit log feature? also when I try to use yum seems like it is corrupted: yum install vzpkg expect Loaded plugins: fastestmirror Config Error: File contains no section headers. file: file://///etc/yum.repos.d/webmin.repo, line: 1 'me=Webmin Distribution Neutral\n' Any idea? Thanks

Posted by MikeDVB, 04-11-2010, 01:44 PM
The issue is with you using sudo - just log in as root and issue the command "/etc/init.d/nginx start" without sudo and see if it works.

Posted by linux-image, 04-11-2010, 01:45 PM
Hi ELvis, If you have the root login, you should try starting nginx after logging in as root. This error shows up when you use 'sudo'. The CentOS kernel doesn’t have the audit log feature enabled and we may have to wait for a bug fix to be released.

Posted by elvis1, 04-11-2010, 01:53 PM
Thanks mike but still the same: [root@server home]# /etc/init.d/nginx start Starting nginx: [FAILED] @linux-image: thanks, but according to what I read this is not something I should really care about thanks again

Posted by MikeDVB, 04-11-2010, 02:04 PM
Then I would look at the log files for nginx and see why it's failing to start.

Posted by xerophyte, 04-11-2010, 02:14 PM
logs may reveal more info about why could not it start

Posted by elvis1, 04-11-2010, 03:44 PM
Yeah I think it is due to Apache being open at the same time, might it be possible? Thanks EDIT: [root@server ~]# /sbin/service httpd stop Stopping httpd: [ OK ] [root@server ~]# /etc/init.d/nginx start Starting nginx: [ OK ] [root@server ~]# thanks EDIT2: how can I solve the yum issue mentioned before? thanks Last edited by elvis1; 04-11-2010 at 03:54 PM.

Posted by MikeDVB, 04-11-2010, 04:03 PM
Fix the issue with this file: /etc/yum.repos.d/webmin.repo Your yum issues will be resolved - maybe reinstall that repo.

Posted by elvis1, 04-11-2010, 04:11 PM
Thanks mike I re the re downloaded the repo and that fixed it

Posted by UWH-David, 04-14-2010, 03:54 PM
If you are using nginx as a reverse proxy in front of Apache you are going to need to move Apache off port 80 and if using SSL port 443 via the httpd.conf file and restart it. Move it to port 8081 and 444 for example and send your nginx proxies to those ports. Restart nginx after the changes as well. If you are using nginx by itself with something like php-fpm then you would want to disable Apache completely.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Gazzin troubles! (Views: 703)
Site Studio (Views: 723)


Language: