RewriteEngine not allowed here

Discussion in 'Installation/Configuration' started by enissayol, Apr 15, 2009.

  1. enissayol

    enissayol New Member

    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 [email protected]

    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 [email protected]"
    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
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It defiantely works when you use "AllowOverride All", maybe you did not restart apache after your changes?
     
  3. enissayol

    enissayol New Member

    I did restart it many times with restart or force-reload
     
  4. falko

    falko Super Moderator ISPConfig Developer

    In which directory is the .htaccess file located?
     
  5. enissayol

    enissayol New Member

    /var/www/fnaire.info/web/
     
  6. astewart

    astewart ISPConfig Developer ISPConfig Developer

    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:


    Save the changes then try access the site again.
     
  7. enissayol

    enissayol New Member

    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
     
  8. astewart

    astewart ISPConfig Developer ISPConfig Developer

    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.
     
  9. enissayol

    enissayol New Member

    grrrrrrrr, it's not working, i did comment out the RewriteBase /
    i don't have this line on my .htaccess Options +FollowSymLinks
     
  10. falko

    falko Super Moderator ISPConfig Developer

    The problem probably is that you have
    Code:
    <Directory /var/www/fnaire.info/web>
    Options SymLinksIfOwnerMatch
    [B]AllowOverride AuthConfig
    AllowOverride FileInfo[/B]
    </Directory>
    in your vhost configuration.
     
  11. enissayol

    enissayol New Member

    I did comment out this part...
     
  12. enissayol

    enissayol New Member

    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
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  14. enissayol

    enissayol New Member

    is there any way to know where the problem is coming from?

    Thanks
     
  15. gkovacs

    gkovacs New Member

  16. enissayol

    enissayol New Member

    i have already tried this solution but still don't work
     
  17. enissayol

    enissayol New Member

    Do i need to reinstall all over again to make it work?:(
     
  18. mgibson

    mgibson New Member

    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)
    Code:
    <Directory /var/www/www.domain.com>
        AllowOverride All
        Order Allow,Deny
        Allow from all
    </Directory>
    (lines 23-34)

    Code:
        <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.
     
  19. enissayol

    enissayol New Member

    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!!
     

Share This Page