Allow client .htaccess overrides

Discussion in 'Developers' Forum' started by quentusrex, Mar 26, 2009.

  1. quentusrex

    quentusrex New Member

    How do I enable a client to have certain .htaccess overrides?
  2. quentusrex

    quentusrex New Member

    I also want to allow the .htaccess to turn on the modrewrite for drupal clean urls.
  3. till

    till Super Moderator

    You can set the overrides either in your apache2.conf file, in the vhost master template or in the apache directives field.
  4. quentusrex

    quentusrex New Member

    Is there a way to do it per client? or if not how do I do it in the master?
  5. till

    till Super Moderator

    No, just per site.

    The master template is in /usr/local/ispconfig/server/conf/
  6. quentusrex

    quentusrex New Member

    How would I allow a client to override the ErrorDocuments in the .htaccess file? what do I change in the vhost.master?
  7. till

    till Super Moderator

    You dont have to edit anything in .htaccess or vhost master to override the error documents. Just enable the checkbox in the site settings and the client can cahge the error pages in the error directory of ist website.
  8. quentusrex

    quentusrex New Member

    drupal wants to be able to handle its own error documents. How would I enable this ability? Drupal says to do it in the .htaccess file, but apache says it isn't allowed.
  9. till

    till Super Moderator

    Which is the exact error message that you get in the apache error log of the site?
  10. quentusrex

    quentusrex New Member

    /var/clients/client2/web2/web/.htaccess: ErrorDocument not allowed here
  11. quentusrex

    quentusrex New Member

    In the .htaccess file:

    # Make Drupal handle any 404 errors.
    ErrorDocument 404 /index.php
  12. till

    till Super Moderator

    Then try to add:

    <Directory /var/www/>
    AllowOverride FileInfo

    in the apache directives field of the website, you will have to replace the path with the path of your site.
  13. andypl

    andypl Member

    Or if you want enable .htaccess for your client in some website put this in directives apache

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

    till Super Moderator

    All harmless settings are already allowed for .htaccess, only if you want to give a client the ability to change settings in .htaccess that might be used to extend the permissions and performance of his webspace you will have to declare that manually. You should always be aware that this might enable the website owner to get more and higher resources from your server then the settings that you have set in ispconfig for the website.
  15. astewart

    astewart ISPConfig Developer

    Thanks! That worked! :)
  16. sirrus

    sirrus HowtoForge Supporter

    You should never use "AllowOverride All" on a production system!!!

    This enables you to change nearly everything in the config! For example renenable disabled functions, to break the open basedir jail and so on...

    It is a really bad idea!!!

    Last edited: May 12, 2009

Share This Page