You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by thomas Armstrong <ta...@gmail.com> on 2008/02/22 18:58:12 UTC

[users@httpd] "RewriteEngine on" creates a "403 Forbidden" error

Hi.

I'm experiencing one problem with Apache2 on Linux. If
I insert a "RewriteEngine On" line in ".htaccess", webpages
return a "403 Forbidden Error".

I inserted these lines in 'httpd.conf':
------------
<Directory "/var/www/httpdocs">
  Options Indexes FollowSymLinks
  AllowOverride All
  FCGIWrapper /var/www/httpdocs/bin/php5 .php5
  FCGIWrapper /var/www/httpdocs/bin/php5 .php
  Options ExecCGI
  Allow from all
  Order Allow,Deny
</Directory>
--------------

If I create a 'http://www.mydomain.com/phpinfo.php', there's no info
about 'mod_rewrite'.

But if I open '/etc/httpd/conf/httpd.conf', I see:
-----
LoadModule rewrite_module modules/mod_rewrite.so
----

And if I list compiled modules:
--------------
[]# httpd -l
Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c
--------------------

---------------------------------------------------------------------
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] "RewriteEngine on" creates a "403 Forbidden" error

Posted by thomas Armstrong <ta...@gmail.com>.
O_O You are right.

Thank you very much, Joshua.  Some lines below I inserted a "Options
ExecCGI" line.

Enjoy your weekend!!!!

On Fri, Feb 22, 2008 at 7:23 PM, Joshua Slive <jo...@slive.ca> wrote:
>
> On Fri, Feb 22, 2008 at 1:11 PM, thomas Armstrong <ta...@gmail.com> wrote:
>  > >  What does the apache error log say?
>  >
>  >  [Fri Feb 22 10:03:38 2008] [error] [client 103.160.51.28] Options
>  >  FollowSymLinks or SymLinksIfOwnerMatch is off
>  >  which implies that RewriteRule directive is forbidden:
>  >  /var/www/httpdocs/phpinfo.php
>
>  There ya go.
>
>  You have two Options lines in your <Directory> section. If you read
>  the docs on Options, you'll notice that the second one will override
>  the first one, causing FollowSymLinks to be turned off. Combine the
>  three options onto one Options line and everything should work.
>
>
>
>  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
>
>

---------------------------------------------------------------------
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] "RewriteEngine on" creates a "403 Forbidden" error

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, Feb 22, 2008 at 1:11 PM, thomas Armstrong <ta...@gmail.com> wrote:
> >  What does the apache error log say?
>
>  [Fri Feb 22 10:03:38 2008] [error] [client 103.160.51.28] Options
>  FollowSymLinks or SymLinksIfOwnerMatch is off
>  which implies that RewriteRule directive is forbidden:
>  /var/www/httpdocs/phpinfo.php

There ya go.

You have two Options lines in your <Directory> section. If you read
the docs on Options, you'll notice that the second one will override
the first one, causing FollowSymLinks to be turned off. Combine the
three options onto one Options line and everything should work.

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] "RewriteEngine on" creates a "403 Forbidden" error

Posted by thomas Armstrong <ta...@gmail.com>.
>  What does the apache error log say?

[Fri Feb 22 10:03:38 2008] [error] [client 103.160.51.28] Options
FollowSymLinks or SymLinksIfOwnerMatch is off
which implies that RewriteRule directive is forbidden:
/var/www/httpdocs/phpinfo.php

---------------------------------------------------------------------
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] "RewriteEngine on" creates a "403 Forbidden" error

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, Feb 22, 2008 at 12:58 PM, thomas Armstrong <ta...@gmail.com> wrote:
> Hi.
>
>  I'm experiencing one problem with Apache2 on Linux. If
>  I insert a "RewriteEngine On" line in ".htaccess", webpages
>  return a "403 Forbidden Error".

What does the apache error log say?

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