Question

I've recently switched over to a fedora 19 cloud server service and got most things squared away except for htaccess. Am I doing this wrong or missing something?

This is what i have updated in my httpd.conf file

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

And Here is my VirtualHost telling it what folder structure and which file to use for htaccess

<VirtualHost *:80>
   DocumentRoot /var/www/vhosts/domain.com/httpdocs
   ServerName www.domain.com
   ServerAlias www.domain.com
   <Directory /var/www/vhosts/domain.com/vhosts/>
      AllowOverride All
      Order allow,deny
      allow from all
   </Directory>
   AccessFileName .htaccess
</VirtualHost>

I've thrown random junk into my htaccess and I do not get a 500 error so I know its not getting read.

Was it helpful?

Solution

Your document root is:

/var/www/vhosts/domain.com/httpdocs

And your <Directory> container is for:

/var/www/vhosts/domain.com/vhosts/

Are those supposed to be different? If your htaccess file is in the httpdocs directory, then that directory doesn't have the AllowOverride All associated with it. If your htaccess file is in the vhosts directory, then it's not being accessed when you go to your website.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top