Fedora 20 upgrade left apache wide-open.

Last night, I discovered that http://crabradio.net/blogold/ wouldn’t load the index.php, and would only load a white screen.  Good thing that I decided to fix it this morning, because I discovered that the apache upgrade left the server ignoring .htaccess files, which allow for password protecting content and directories on the web server.  The result was a ‘wide-open’ web server.  It would only be a matter of time before Google bots and Yahoo spiders would start sucking me dry trying to download the contents of my web system.  Very similar to what happened when a bad symlink allowed open access to the entire filesystem.  Google bots were having a field day with that, and I’m sure would love it again, if I didn’t fix it right away.

Both items were a fairly simple fix in the same section of the /etc/httpd/conf/httpd.conf file.  (First, had to become root user.)

# nano /etc/httpd/conf/httpd.conf

I went to the Directory Directive for /var/www/html and added two lines highlighted in green…..

<Directory “/var/www/html”>
#
DirectoryIndex index.php
#
AllowOverride All

I actually edited the AllowOverride line from ‘None’ to ‘All’.  That line controls what directives can be placed into .htaccess files.  Since apache decided to make it None, it was ignoring them.  Thanks, Apache!  Last thing to do was restart or reload the httpd service.  This is done by:

# service httpd restart

But, since service has been replaced by systemctl, there is no telling when fedora will decide to fully depreciate service.  So, you should probably start getting used to the new command.  It does so much more, anyway.

# systemctl reload httpd

To make sure that it started okay:

# systemctl status httpd

or # service httpd status

Well, everything is now running as it should.  😉