Apache is an open source web server that runs on a variety of platforms including various UNIX flavours, Novell Netware and Microsoft Windows. It is used to run more websites on the Internet than any other webserver and has done so since 1996, as reported by the Netcraft Webserver Survey. The Apache webserver can be downloaded in binary and source form from the Apache website.
Default installations of Apache usually alias /icons to Apache’s icons directory which cannot be overridden in an .htaccess file. If you do not control the Apache configuration of a server, and for maximum compatibility, it is always best to never have an /icons directory at a website’s root level.
PHP code in a script is commonly delimited by opening <?php and closing ?> tags but there are also the older short open tags like this <? There are instances where you may need to disable short tags as shown in this post and using an Apache .htaccess file.
When temporarily taking down a website to perform maintenance, it’s a good idea to return a "503 Service Temporarily Unavailable" header so search engines know to come back later. This post shows how to set this header using an Apache .htaccess file, and also how to show a response page to users with PHP so they know to try again later.
The default .htaccess file for SilverStripe runs all URLs that do not belong to actual files on the filesystem through the Sapphire framework. This means that if a request is made for a CSS file that does not exist, for example, it will be run through SilverStripe/Sapphire, which is not really necessary.
There are times you may need to monitor what’s happening on an Apache web server as is happens. This can be done from the command line using a combination of the tail command, which outputs the last part of a file, and grep or egrep which are used for regular expression pattern matching.
PHP has a large number of configuration option which can be set in the php.ini file, Apache <virtualhost> blocks, .htaccess files and ini_set(). This post looks at how to set PHP configuration options with Apache’s .htaccess files.