[RESOLVED]RewriteRule directive is forbidden

5 posts / 0 new
Last post
#1 Sun, 01/30/2011 - 00:29

[RESOLVED]RewriteRule directive is forbidden


My apache logs have this error for all the domain which uses .htaccess file.

Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden:

I added Options FollowSymLinks to .htaccess file but the error remains. I also tried with Options +FollowSymLinks but to no success.

Most of the websites were running using .htaccess files from a long time, its now that this error starts appearing in my virtual domain log file.

I believe there is something to be done on httpd.conf file but dunno which part needs editing. By the way I'm using Virtualmin Pro.

Regards Kk

Sun, 01/30/2011 - 06:53

One possible reason might be that the .htaccess is not allowed to modify the status of "FollowSymLinks". You might want to check the Apache config of the domain in question for the "AllowOverride" directive.

Mon, 01/31/2011 - 05:55
SuexecUserGroup "#517" "#519" ServerName mydomain.com ServerAlias www.mydomain.com ServerAlias admin.mydomain.com DocumentRoot /home/mydomain/public_html ErrorLog /var/log/virtualmin/mydomain.com_error_log CustomLog /var/log/virtualmin/mydomain.com_access_log combined ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/ ScriptAlias /awstats /home/mydomain/cgi-bin DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/mydomain/public_html> Options -Indexes IncludesNOEXEC FollowSymLinks ExecCGI allow from all AllowOverride All AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php5 </Directory> <Directory /home/mydomain/cgi-bin> allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =admin.mydomain.com RewriteRule ^(.*) https://mydomain.com:10000/ [R] RemoveHandler .php RemoveHandler .php5 IPCCommTimeout 31 <Files awstats.pl> AuthName "mydomain.com statistics" AuthType Basic AuthUserFile /home/mydomain/.awstats-htpasswd require valid-user </Files> PerlRequire /etc/webmin/virtualmin-google-analytics/apachemod.pl PerlOutputFilterHandler Virtualmin::GoogleAnalytics Alias /dav /home/mydomain/public_html Alias /pipermail /var/lib/mailman/archives/public <Location /dav> DAV On AuthType Basic AuthName mydomain.com AuthUserFile /home/mydomain/etc/dav.digest.passwd Require valid-user ForceType text/plain Satisfy All RemoveHandler .php RemoveHandler .php5 RewriteEngine off </Location> ProxyPass /dav/ ! ProxyPassReverse /dav/ ! <Proxy *> allow from all </Proxy> RedirectMatch /cgi-bin/mailman/([^/\.]*)(.cgi)?(.*) https://mydomain.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3 RedirectMatch /mailman/([^/\.]*)(.cgi)?(.*) https://mydomain.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3

The above are the directives of the the domain in questions.

Mon, 01/31/2011 - 07:52

The issue is resolved now.

In /etc/httpd/conf.d/welcome.conf file there was missing "-" before Indexes. Adding "-" to Indexes making it -Indexes resolved the issue.

Thanks for your help.

Regards Kk

Fri, 11/02/2012 - 15:32

Your tip helped me figure out why the Welcome Screen was coming up for all of the websites on my server when I didn't have anything after the domain name. I was struggling with why I had to add index.html or index.php to get to my websites. I now have a dash in front of Indexes in my welcome.conf as appears below and it has fixed the problem:

root@answer conf.d# more welcome.conf
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL.  To disable the Welcome page, comment
# out all the lines below.
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html