Common Apache errors

From LinuxReviews
Jump to: navigation, search

[edit] "(28)No space left on device: mod_rewrite: could not create rewrite_log_lock"

Problem: Apache shutdown unclean and claims there is no more space left (even though there is enough free space).

Cause: There are myriads of semaphore-arrays left, owned by my apache-user.


Remove the semaphores left by the apache user ("apache" is used here; apache users are also frequently named "httpd" and "nobody")

What's left behind?

ipcs -s | grep apache

Remove it: ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

[edit] HOWTO Stop apache/mod_ssl binding to port 443 on all IP's

Apache howto story is mostly that you kindly ask Apache to listen..:

Listen NameVirtualHost
Listen NameVirtualHost [2001:0618:0400:234a:1338:0000:0000:0002]:443

.. on a few IPs and that's what it does. Sadly, this don't work "out of the box" on common Apache configurations such as those included with CentOS, Fedora, etc.

The almost secret and extremely annoying trick has been to place "Listen 443" in the by-default included configuration file /etc/httpd/conf.d/ssl.conf. This nasty trick makes Apache gobble up port 443 on every IP it can get it's hands on, regardless of it listening on 80, doing anything, and so on, and it's a bit hard to spot - since "Listen 80", and other such settings, are placed in httpd.conf.[1]

[edit] References

  1. Mod-SSL mailing list; Long totally useless and uninformative debate about Apache listening on every 443 port by default without anyone being able to figure how what on earth is going on
Personal tools
hardware tests
Privacy policy
linux events


linux newz | random page | poetry | free blog