PDA

View Full Version : RewriteEngine not allowed here


enissayol
15th April 2009, 22:37
Hi all,

First of all, thanks for your help, i've been looking for an answer to my problem but i couldn't find one, i'v tried all the solutions but it didn't work for me...
Here is my problem:
I have Installed Ispconfig 3, everything is working except the URL rewriting using Wordpress, when i check the logs of the web site i can see the error:RewriteEngine not allowed here
The code of the htaccess is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

The code of my conf file is :
<Directory /var/www/fnaire.info>
AllowOverride all
Order Deny,Allow
allow from all
</Directory>

<VirtualHost 87.98.170.131:80>
DocumentRoot /var/www/fnaire.info/web

ServerName fnaire.info
ServerAlias *.fnaire.info
ServerAdmin webmaster@fnaire.info

ErrorLog /var/log/ispconfig/httpd/fnaire.info/error.log

ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 503 /error/503.html

<Directory /var/www/fnaire.info/web>
Options SymLinksIfOwnerMatch
AllowOverride AuthConfig
AllowOverride FileInfo
</Directory>
<Directory /var/www/clients/client1/web4/web>
Options SymLinksIfOwnerMatch
AllowOverride AuthConfig
AllowOverride FileInfo
</Directory>

# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@fnaire.info"
php_admin_value upload_tmp_dir /var/www/clients/client1/web4/tmp
php_admin_value session.save_path /var/www/clients/client1/web4/tmp
#php_admin_value open_basedir /var/www/clients/client1/web4:/usr/share/php5
</VirtualHost>

The mid_rewrite is on, i have tried the options :
AllowOverride All
AllowOverride FileInfo

Thanks for your help

till
16th April 2009, 12:30
It defiantely works when you use "AllowOverride All", maybe you did not restart apache after your changes?

enissayol
16th April 2009, 18:19
I did restart it many times with restart or force-reload

falko
16th April 2009, 18:32
In which directory is the .htaccess file located?

enissayol
16th April 2009, 19:02
/var/www/fnaire.info/web/

astewart
16th April 2009, 20:01
/var/www/fnaire.info/web/

I had the same problem but this worked for me:
In the ISPCONFIG CP.
Add the following to the Apache directives for the specific site:

<Directory /var/www/fnaire.info/web>
Options +Includes -Indexes -ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>


Save the changes then try access the site again.

enissayol
16th April 2009, 22:50
i just tried but it didn't work...it adds the code on my fnaire.info.vhost file (apache restarted) and i keep getting the 500 error

astewart
16th April 2009, 23:42
i just tried but it didn't work...it adds the code on my fnaire.info.vhost file (apache restarted) and i keep getting the 500 error

Alright, leave the code in the apache directive that I mentioned in my last post.
In your .htaccess file, comment out "RewriteBase /", this is only used if your wordpress installation is in another directory other then root. So basically comment it out if your WP is installed in /var/www/fnaire.info/web/.

Also, comment out this in your .htaccess file:
Options +FollowSymLinks

Give this a try.

enissayol
17th April 2009, 00:06
grrrrrrrr, it's not working, i did comment out the RewriteBase /
i don't have this line on my .htaccess Options +FollowSymLinks

falko
17th April 2009, 17:33
The problem probably is that you have
<Directory /var/www/fnaire.info/web>
Options SymLinksIfOwnerMatch
AllowOverride AuthConfig
AllowOverride FileInfo
</Directory>
in your vhost configuration.

enissayol
17th April 2009, 22:48
I did comment out this part...

enissayol
18th April 2009, 16:53
do you think that the problem is coming from my php.ini?
i also have a worning everytime i restart my apache:
[warn] NameVirtualHost 87.98.170.131:80 has no VirtualHosts
[warn] NameVirtualHost 87.98.170.131:443 has no VirtualHosts

till
18th April 2009, 18:01
This warning does not matter. It just means that you added a IP to the configuration that is not in use yet as a virtual host.

enissayol
18th April 2009, 18:29
is there any way to know where the problem is coming from?

Thanks

gkovacs
18th April 2009, 21:07
I have found the problem, the latest ISPConfig sets the Options and AllowOverride directives to a new value that prohibits the running of mod_rewrite in the respective directories.

More in this thread:
http://www.howtoforge.com/forums/showthread.php?t=33805

enissayol
19th April 2009, 01:00
i have already tried this solution but still don't work

enissayol
19th April 2009, 18:52
Do i need to reinstall all over again to make it work?:(

mgibson
19th April 2009, 19:31
Hi,

I had similar issues trying to set rewrites in Joomla up, heres how I fixed it:

gedit /etc/apache2/sites-available/www.domain.com.vhost

(lines 1 to 5)
<Directory /var/www/www.domain.com>
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>

(lines 23-34)

<Directory /var/www/www.domain.com/web>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<Directory /var/www/clients/client1/web1/web>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Save your file and close.
Restart apache - sudo /etc/init.d/apache2 restart

Hope this helps

Mark.

enissayol
20th April 2009, 00:48
thanks but it's not working
I am getting crazy with this problem :(
It's been 2 weeks now that i am stuck!
help please!!