View Single Post
  #8  
Old 30th November 2005, 12:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Quote:
Originally Posted by crudolphy
It seems that this has become two issues so I will keep this thread going on the .htaccess issue which could conclude quickly and start a new thread for the error messages above.

Regarding .htaccess. I read this afternoon a short tutorial from the Apache Web Site. It states,

"In general, you should never use .htaccess files unless you don't have access to the main server configuration file."

Later on they say,

"However, in general, use of .htaccess files should be avoided when possible. Any configuration that you would consider putting in a .htaccess file, can just as effectively be made in a <Directory> section in your main server configuration file."

Because this is my machine I have access to the main configuration, so I could do away with the .htaccess file completely by making those changes directly. This would be method #1 of solving this.

In the /etc/apache2/apache2.conf there are several places where .htaccess files are discussed. Once in a <files></files> section and also in all of the <directory></directory> sections. In every case the directives contained are:

Order allow,deny
Deny from all

Now I understand why I got the http 500 internal server error.
The ISPConfig installer should have added

Code:
<Directory /var/www/*/web>
    Options +Includes -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
</Directory>
to your httpd.conf, so .htaccess files should work. They in fact do on my installation.




Quote:
Originally Posted by crudolphy
In ISPConfig there is a section ("Apache Directives") for the ISPConfig adminstrator to enter in specfic directives for each virtual host. These directives I believe are stored in the /etc/apache2/vhosts/Vhosts_ispconfig.conf file, is this correct?
Yes.

Quote:
Originally Posted by crudolphy
Could a custom <directory></directory> section be entered in this section that pertained to the /var/www/web1/web/egroupware directory, listing the specific directives for just that directory, thus eliminating the need for the .htaccess file?
You could paste
Code:
php_value memory_limit 32M
php_value max_execution_time 60
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
#settings for the file upload, you might increase them further
php_value upload_max_filesize 16M
#session handling: now the check for expired sessions is done on every 10th session creation
php_flag session.use_trans_sid Off
php_value session.gc_probability 1
php_value session.gc_divisor 10
#multibyte extension: needed for utf-8
php_value mbstring.func_overload 7
into the Apache Directives field, which would make these directives valid for all directories of your web site; if you want them to be valid only for a specific directory, use

Code:
<Location '/egroupware'>
php_value memory_limit 32M
php_value max_execution_time 60
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
#settings for the file upload, you might increase them further
php_value upload_max_filesize 16M
#session handling: now the check for expired sessions is done on every 10th session creation
php_flag session.use_trans_sid Off
php_value session.gc_probability 1
php_value session.gc_divisor 10
#multibyte extension: needed for utf-8
php_value mbstring.func_overload 7
</Location>

Quote:
Originally Posted by crudolphy
Looking at the /etc/apache2/vhosts/Vhosts_ispconfig.conf file I see several statements that are similiar in nature to the directives contained in this .htaccess file. Would it be possible to place the directives contained in the .htaccess file directly in "Vhosts" file by hand or via the ISPConfig "Apache Directives" configuration page?
Don't edit the Vhosts_ispconfig.conf file manually! Your changes will be overwritten by ISPConfig!

Quote:
Originally Posted by crudolphy
Lastly which of the methods that you identify as correct would in your opinion be the best way to address this?
Use the Apache Directives field.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote