PHP/MySQL-driven development, Windows 7, JavaScript
Posts tagged httpd.conf
Setting up virtual hosts with Apache on Windows XP
Sep 13th
In this tutorial, we will discuss how to setup virtual hosts for your development environment (or production, if you wish) on Windows XP. This will allow you to use URLs such as http://mywebsite/ instead of http://localhost/mywebsite/, which is much more realistic. Read the rest of this entry »
How Zend Server CE breaks WordPress Permalinks and how to fix it
Aug 31st
Recently, I switched to Zend Server CE from a manually installed AMP package (Apache/MySQL/PHP) to make use of Zend’s lightweight environment and easy install package. In doing this, I found that it broke the permalinks associated with WordPress. Despite mod_rewrite being enabled, and the “Pretty Permalinks” code being in the .htaccess file, it still didn’t work.
To fix this problem do the following:
- Open up httpd.conf. (On Windows, the default location of this file is C:\Program Files\Zend\Apache2\conf\.)
- Find the line with <Directory />.
- Make sure +FollowSymLinks is present on the Options line. (i.e. Options +FollowSymLinks)
- Change AllowOverride None to AllowOverride All.
- Restart Apache.
AllowOverride controls how .htaccess files are used. When AllowOverride is set to None, users cannot override the configurations set in httpd.conf for particular directories. While the .htaccess in this client’s WordPress directory was correct, Apache wasn’t allowing it to override the default settings as stated in httpd.conf. It is definitely worth it to learn more about how to configure Apache so that you can have a secure and well-performing environment, especially if a lot of developers work on the same production server.
If you have similar experience, we would love to hear what you have to say. Perhaps it will save someone else a minute or even a few hours.
