Apache Configuration System
Common Questions
← Go Back- Question: A user wants to add something to the main section of httpd.conf.
- Question: apache_conf_distiller or userdata_update fail before EasyApache runs.
- Question: Apache configuration fails after rebuilding Apache.
- Question: Apache works fine but PHP isn't working properly.
- Question: Apache defaults to listening on all available IPs, but another service should listen on a conflicting port on one or more IPs
- Question: Will my custom /usr/local/apache/htdocs contents be preserved?
- Question: A user wants to add something to the main section of httpd.conf
- Answer: Edit the file and run
/usr/local/cpanel/bin/apache_conf_distiller --update --main. This will update the main Apache template and datastores to include the new directive(s). If something is being removed, --reset may also be required but is rarely the case. - Question: apache_conf_distiller or userdata_update fail before EasyApache runs
- Answer: Run these tools with the "—verbose" flag and isolate what is causing the problem. If these tools fail to function properly, then the issue should be addressed prior to rebuilding Apache otherwise there may be data loss.
- Question: Apache configuration fails after rebuilding Apache
- Answer: These failures are always accompanied by a message stating the location of the failed httpd.conf and the failure message that was generated. Look at that file and identify why Apache rejected the new configuration file. If the problem is a missing module (DSO or compiled in), file a bug report saying which Directive appeared in the failed httpd.conf and which module was missing (including the log output about the option failing if any). If the failure looks like it was caused by corrupted userdata, use the tools available to correct the issue
- Question: Apache works fine but PHP isn't working properly.
- Answer: The EasyApache build system and the new
Cpanel::AdvConfigconfiguration system leave the PHP configuration contained in php.ini largely untouched. When users upgrade PHP, they need to check that their php.ini is configured correctly. They need to update their extensions, and they might need to update any PHP MIME types or directives they have listed in .htaccess files. Fortunately, the PHP configuration supplied by cPanel is in a single file/usr/local/apache/conf/php.conf, so if MIME types are the issue, check that file to see how PHP is configured and update the .htaccess files to use the configured MIME type. If the php.ini file is to blame, make sure the extension_dir is set properly (use php-config to find the correct one), make sure the extensions being loaded are actually installed, make sure Zend and ION are up to date, and most problems will be resolved. As far as Zend not working with different PHP configuration flags, we are attempting to document these in the EasyApache interface as they are discovered.
- Question: Apache defaults to listening on all available IPs, but another service should listen on a conflicting port on one or more IPs
- Answer: By creating the file
/etc/apache_reservedipswhich contains one IP per line, you can tell the configuration generation tools to exclude those IPs from Apache. Afterwards Apache will listen on all available IPs minus the IPs configured in/etc/apache_reservedips.
/usr/local/apache/htdocs/ea3_apache_build_htdocs/will contain Apache's default website from make install- everything that was in there before (except the previous Apache's ea3_apache_build_htdocs site ) is restored
/usr/local/apache/htdocs/suspended.pageand/usr/local/apache/htdocs/index.htmlare set to defaults if they do not exist
If the build process fails prior to Apache's make install with this error:
Could not remove "/usr/local/apache/htdocs": Permission
denied
Then you most likely have files set to immutable. That will need changed.
If you feel its absolutely needed, a safer way to ensure they are not accidentally changed will need implemented. (E.g. scheduled svn export, md5 sum "check and replace if need be", etc)
