Apache
Main documentation: http://httpd.apache.org/docs/
ServerName and VirtualHosts
Apache can be configured to only serve one site, or to serve multiple sites. If multiple sites are to be served, VirtualHosts need to be set up. If it is only serving a single site, it may either use or not use a VirtualHost entry. If no such entry is used, ServerName needs to be the name of the site. If one or more VirtualHost entries are used, then ServerName (outside of the VirtualHost tags) may be completely different from the sites, i.e. the hostname may be used.
Check for a module
CentOS
The httpd -l command doesn't always show everything. Grep for the module:
grep -i module /etc/httpd/conf/httpd.conf
Debian/Ubuntu
Only a very few will be listed with an apache2ctl -l command. Check /etc/apache2/mods-enabled and compare with /etc/apache2/mods-available.
To load a module:
a2enmod moduleIwant
To unload a module:
a2dismod moduleIdonotwant
Restart Apache to implement the change.
mod_rewrite
- Make sure it is compiled in.
- Make sure it is turned on: RewriteEngine On
- Add the line you want to rewrite. RewriteCond <whatever>
- Add the instructions for what to do with it. RewriteRule <whatever>
- Repeat RewriteRule for multiple RewriteCond statements. Close with L. May be able to use an OR after each RewriteCond instead of repeating the RewriteRule, I need to test this.
More in: htaccess
PHP Handler
Remember to check for SuExec as well.
cPanel
/usr/local/cpanel/bin/rebuild_phpconf --current
Anything else
Check output of httpd -M or /etc/httpd/conf.d/php.conf