You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard de Vries <ri...@yahoo.com> on 2006/11/02 17:44:10 UTC

[users@httpd] mod_rewrite not working

I have a very strange situation.

I am running two webservers. Both Apache 2.0.59 with
almost identical configuration. On both servers I
configured a mod_rewrite rule. It works on one, but
not on the other.

The webserver that does not work reports the following
error message:

[Thu Nov 02 08:22:16 2006] [error] [client
xxx.xxx.xxx.xxx] Options FollowSymLinks or
SymLinksIfOwnerMatch is off which implies that
RewriteRule directive is forbidden:
/var/www/html/secure


### config of the functioning webserver

<Directory "/var/www/html">
    #
    # Possible values for the Options directive are
"None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks
SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named
*explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and
important.  Please see
    #
http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options -ExecCGI -FollowSymlinks -Indexes

    #
    # 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 None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
</Directory>

<Location /secure>
        RewriteEngine on
        RewriteBase /secure/
        RewriteCond %{HTTPS} off
        RewriteRule (.*)
https://www.mydomain.com%{REQUEST_URI}
</Location>

### config of the non-functioning webserver

#
<Directory "/var/www/html">
    #
    # Possible values for the Options directive are
"None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks
SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named
*explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and
important.  Please see
    #
http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options -ExecCGI -FollowSymlinks -Indexes

    #
    # 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 None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
</Directory>

<Location /secure>
        RewriteEngine on
        RewriteBase /secure/
        RewriteCond %{HTTPS} off
        RewriteRule (.*)
https://www.mydomain.com%{REQUEST_URI}
</Location>

Any feedback would greatly be appreciated. Thanks
guys!

  Richard


 
____________________________________________________________________________________
Access over 1 million songs - Yahoo! Music Unlimited 
(http://music.yahoo.com/unlimited)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite not working

Posted by Richard de Vries <ri...@yahoo.com>.
I did that prior to the grep on Options and then
copied all the included configuration files in the
same directory, followed by the "grep 'Options' *".

I have 2 more servers that have the exact same
configuration settings (other than the directives for
the servername etc), which work properly too. It is
just this one server that does not work.

You could make the argument that this particular
instance *does* work as designed since neither of the
+FollowSymLinks or +SymLinksIfOwnerMatch are set ...
but that doen't explain why mod_rewrite works on the
other servers with -FollowSymLinks set.

All instances are running on Solaris 9 ... it just
doesn't make any sense.



--- Joshua Slive <jo...@slive.ca> wrote:

> On 11/2/06, Richard de Vries
> <ri...@yahoo.com> wrote:
> > I looked thru it again  ... and I did a grep on
> > "Options" on *ALL* the config files and I can't
> find
> > anything.
> 
> Do the same grep for "Include" to see what other
> config files you are using.
> 
> Joshua.
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 



 
____________________________________________________________________________________
Everyone is raving about the all-new Yahoo! Mail 
(http://advision.webevents.yahoo.com/mailbeta/)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite not working

Posted by Joshua Slive <jo...@slive.ca>.
On 11/2/06, Richard de Vries <ri...@yahoo.com> wrote:
> I looked thru it again  ... and I did a grep on
> "Options" on *ALL* the config files and I can't find
> anything.

Do the same grep for "Include" to see what other config files you are using.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite not working

Posted by Richard de Vries <ri...@yahoo.com>.
I looked thru it again  ... and I did a grep on
"Options" on *ALL* the config files and I can't find
anything.

# This is the working config:
$ grep "Options" *
httpd.conf:    Options None
httpd.conf:    # Possible values for the Options
directive are "None", "All",
httpd.conf:    # Note that "MultiViews" must be named
*explicitly* --- "Options All"
httpd.conf:    # The Options directive is both
complicated and important.  Please see
httpd.conf:    Options -ExecCGI -FollowSymlinks
-Indexes
httpd.conf:    #   Options FileInfo AuthConfig Limit
httpd.conf:    # (You will also need to add "ExecCGI"
to the "Options" directive.)
httpd.conf:    # (You will also need to add "Includes"
to the "Options" directive.)
httpd-ssl.conf:        #   SSL Engine Options:
httpd-ssl.conf:        #SSLOptions +FakeBasicAuth
+ExportCertData +StrictRequire
httpd-ssl.conf:            SSLOptions +StdEnvVars
httpd-ssl.conf:        #    SSLOptions +StdEnvVars

# This is the non-working config:
$ grep "Options" *
httpd.conf:    Options None
httpd.conf:    # Possible values for the Options
directive are "None", "All",
httpd.conf:    # Note that "MultiViews" must be named
*explicitly* --- "Options All"
httpd.conf:    # The Options directive is both
complicated and important.  Please see
httpd.conf:    Options -ExecCGI -FollowSymlinks
-Indexes
httpd.conf:    #   Options FileInfo AuthConfig Limit
httpd.conf:    # (You will also need to add "ExecCGI"
to the "Options" directive.)
httpd.conf:    # (You will also need to add "Includes"
to the "Options" directive.)
httpd-ssl.conf:        #   SSL Engine Options:
httpd-ssl.conf:        #SSLOptions +FakeBasicAuth
+ExportCertData +StrictRequire
httpd-ssl.conf:            SSLOptions +StdEnvVars
httpd-ssl.conf:            SSLOptions +StdEnvVars



> > There error message is quite explicit.  On the
> > working server, you
> > must have someplace else in the config (or an
> > .htaccess or an
> > Include'd config file) where you are turning on
> > Options FollowSymLinks
> > or SymLinksIfOwnerMatch.
> 
> 
> That's just it, there is not. I don't have any
> .htaccess files either. Let me look thru the config
> files one more time, just in case ....
> 
> 
>  
>
____________________________________________________________________________________
> We have the perfect Group for you. Check out the
> handy changes to Yahoo! Groups 
> (http://groups.yahoo.com)
> 
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 



 
____________________________________________________________________________________
Access over 1 million songs - Yahoo! Music Unlimited 
(http://music.yahoo.com/unlimited)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite not working

Posted by Richard de Vries <ri...@yahoo.com>.
> There error message is quite explicit.  On the
> working server, you
> must have someplace else in the config (or an
> .htaccess or an
> Include'd config file) where you are turning on
> Options FollowSymLinks
> or SymLinksIfOwnerMatch.


That's just it, there is not. I don't have any
.htaccess files either. Let me look thru the config
files one more time, just in case ....


 
____________________________________________________________________________________
We have the perfect Group for you. Check out the handy changes to Yahoo! Groups 
(http://groups.yahoo.com)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite not working

Posted by Joshua Slive <jo...@slive.ca>.
On 11/2/06, Richard de Vries <ri...@yahoo.com> wrote:
> I have a very strange situation.
>
> I am running two webservers. Both Apache 2.0.59 with
> almost identical configuration. On both servers I
> configured a mod_rewrite rule. It works on one, but
> not on the other.
>
> The webserver that does not work reports the following
> error message:
>
> [Thu Nov 02 08:22:16 2006] [error] [client
> xxx.xxx.xxx.xxx] Options FollowSymLinks or
> SymLinksIfOwnerMatch is off which implies that
> RewriteRule directive is forbidden:
> /var/www/html/secure

There error message is quite explicit.  On the working server, you
must have someplace else in the config (or an .htaccess or an
Include'd config file) where you are turning on Options FollowSymLinks
or SymLinksIfOwnerMatch.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org