PDA

View Full Version : Allow client .htaccess overrides


quentusrex
26th March 2009, 21:21
How do I enable a client to have certain .htaccess overrides?

quentusrex
26th March 2009, 21:26
I also want to allow the .htaccess to turn on the modrewrite for drupal clean urls.

till
27th March 2009, 13:19
You can set the overrides either in your apache2.conf file, in the vhost master template or in the apache directives field.

quentusrex
28th March 2009, 00:20
Is there a way to do it per client? or if not how do I do it in the master?

till
28th March 2009, 00:22
Is there a way to do it per client?

No, just per site.

or if not how do I do it in the master?

The master template is in /usr/local/ispconfig/server/conf/

quentusrex
28th March 2009, 00:30
How would I allow a client to override the ErrorDocuments in the .htaccess file? what do I change in the vhost.master?

till
28th March 2009, 00:32
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.

quentusrex
28th March 2009, 00:33
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.

till
28th March 2009, 00:39
Which is the exact error message that you get in the apache error log of the site?

quentusrex
28th March 2009, 00:40
/var/clients/client2/web2/web/.htaccess: ErrorDocument not allowed here

quentusrex
28th March 2009, 00:41
In the .htaccess file:

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

till
28th March 2009, 00:47
Then try to add:

<Directory /var/www/yoursite.com/web>
AllowOverride FileInfo
</Directory>

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

andypl
3rd April 2009, 01:16
Or if you want enable .htaccess for your client in some website put this in directives apache

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

till
3rd April 2009, 10:12
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.

astewart
3rd April 2009, 20:30
Or if you want enable .htaccess for your client in some website put this in directives apache

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


Thanks! That worked! :)

sirrus
12th May 2009, 21:30
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!!!

Regards,
Andreas