This is an old revision of the document!
Problem: Apache fails to do
restart, but succeeds if you do
stop followed by
# service httpd restart Checking Apache 2.4 Web Server configuration.................................[ DONE ] Stopping Apache 2.4 Web Server service.......................................[ DONE ] Starting Apache 2.4 Web Server service.......................................[ FAIL ] (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080 (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080 no listening sockets available, shutting down AH00015: Unable to open logs
It's php session to blame, however,
/etc/sysconfig/httpd has some variable where you can adjust sleep between stop and start
You should try enabling and increasing it
Apache 2.4 has landed in Th on June 7, 2013. See announcement.
All webapps have been migrated to new mod_authz_host access syntax and usage of mod_access_compat is strongly discouraged. The rationale for it is that access_compat and authz_host are independent of each other and operate on separate namespaces. Main httpd configs contain only authz_host directives and enabling access_compat means allowing access to all locations/directories that are not explicitly denied by authz_host.
Note: In case there exist both authz_host and access_compat directives for a location, the Deny clause of ANY of them takes precedence (in short: deny always wins, regardless where it comes from).
Detailed information about upgrading and all changes between apache 2.2 and 2.4 can be found here
as for more complex examples, require ip or password:
Order Deny,Allow Deny from all Allow from my.lan Allow from 2001:1234:5678::/64 AuthType Basic AuthName www.my.lan AuthBasicProvider ldap AuthLDAPURL "ldap://server:389/ou=People,dc=example,dc=com?uid?sub?(objectClass=*)" Require valid-user Satisfy Any
The solution is very simple, just list the requirements and 2.4 somehow magically knows what you mean:
Require host my.lan Require ip 2001:1234:5678::/64 AuthType Basic AuthName www.my.lan AuthBasicProvider ldap AuthLDAPURL "ldap://server:389/ou=People,dc=example,dc=com?uid?sub?(objectClass=*)" Require valid-user
If you need to
AND multiple requires, wrap them inside <RequireAll></RequireAll>
If you need to support both Apache 2.2 and 2.4, then, for example, if Apache 2.2 config contained:
Allow from all
you need to use:
# Apache 2.x <IfModule !mod_authz_core.c> Order allow,deny Allow from all </IfModule> # Apache 2.4 <IfModule mod_authz_core.c> Require all granted </IfModule>