WordPress permalink issue in CentOS
By
The problem seemed fairly straightforward at the beginning. We had just moved a server from dedicated hardware to a Xen guest CentOS. Within a day of the move we started hearing complains that 2 wordpress sites in the new server are showing 404 for all pages except the home page and occasionally a 500 internal server error.
I knew right away that it had something to do with our apache configuration in the new server but didn’t quite know what the issue was. Digging deeper, I discovered it is the WP permalink setting that is throwing things off. Custom permalinks do not work but default page url’s work fine. So it’s a mod_rewrite problem then.
Some more digging ..
Oh .. AllowOverride needs to be set to “all” for wordpress rewrite rules in .htaccess to work. So I add the following line to the virtual host configuration.
AllowOverride all
Did that fix it? No.
Tested a basic rewrite rule and that seemed to work. Then what’s wrong with WP rewrite rules?
Digging continues … and eventually it turns out that FollowSymlinks is missing in the virtual host config. Added +FollowSymlinks in the line below and voila .. WP links are back.
Options +Indexes +FollowSymlinks
I guess it’s a stupid problem to blog about but it stressed me out so much for a few hours that I thought I can not be the only one out there facing this issue and it’s worth writing about.
The final virtual host config looks like the following -
DocumentRoot "/home/pavel/web/www.shuchintya.com/"
ServerName www.shuchintya.com
ServerAlias shuchintya.com
<Directory "/home/pavel/web/www.shuchintya.com/">
AllowOverride All
allow from all
Options +Indexes +FollowSymlinks
</Directory>


it worked for me, thanks
Worked for me as well. Thanks much.