Scientifc Linux / CentOS / RHEL and lighttpd | lighttpd doesn't start (SOLVED)

Just because lighttpd is so much faster (and less memory consuming) than the heavy weight Apache2 here's a small tutorial on how make it come up on Scietific Linux, CentOS ...

[root@heisdeadjim ~]# service lighttpd restart
Stopping lighttpd:[FAILED]
Starting lighttpd: 2011-01-27 23:15:24: (server.c.722) couldn't set 'max filedescriptors' Operation not permitted
[root@heisdeadjim ~]# semodule -DB
[root@heisdeadjim ~]# /etc/init.d/auditd restart
Stopping auditd:[ OK ]
Starting auditd:[ OK ]
[root@heisdeadjim ~]# /etc/init.d/lighttpd restart
Stopping lighttpd:[FAILED]
Starting lighttpd: 2011-01-27 23:17:46: (server.c.722) couldn't set 'max filedescriptors' Permission denied [FAILED]
[root@heisdeadjim ~]# grep lighttpd /var/log/audit/audit.log | audit2allow -M lighttpdmaxfds
[root@heisdeadjim ~]# semodule -i lighttpdmaxfds.pp
[root@heisdeadjim ~]# /etc/init.d/lighttpd start
Starting lighttpd:[ OK ]
[root@heisdeadjim ~]# /usr/sbin/semodule -B

DONE! Have fun!

Comments

How to have audit2allow installed on CentOS 6

Do not forget to run yum install policycoreutils-python in order to have audit2allow setup on your computer. Depending on the initial configuration this tool may not be installed.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.