Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th April 2010, 23:17
dclardy dclardy is offline
Senior Member
 
Join Date: Sep 2009
Location: Dallas, TX
Posts: 347
Thanks: 10
Thanked 50 Times in 28 Posts
Default Changing default .htaccess in stats folder

Does anyone know where I can find this default .htaccess file? I would like to add some things to the file so that my drupal sites can have access to the stats folders, and I just want it done on creation.

Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 7th April 2010, 11:00
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,995
Thanks: 840
Thanked 5,647 Times in 4,457 Posts
Default

The file is created from in the apache plugin. There is no template for it.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 7th April 2010, 20:51
dclardy dclardy is offline
Senior Member
 
Join Date: Sep 2009
Location: Dallas, TX
Posts: 347
Thanks: 10
Thanked 50 Times in 28 Posts
 
Default

Thanks for the help Till.

Just in case any one else wants to add this automatically. It gives you access to the stats folder when Drupal is installed. It might work with other CMS as well.

Code:
DirectoryIndex index.php index.html index.htm
Options +Indexes
Code:
//* Create .htaccess and .htpasswd file for website statistics
                if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess') or $data["old"]["document_root"] != $data["new"]["document_root"]) {
                        if(!is_dir($data["new"]["document_root"].'/web/stats')) mkdir($data["new"]["document_root"].'/web/stats');
                        $ht_file = "DirectoryIndex index.php index.html index.htm\nOptions +Indexes\n\n\nAuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data["new"]["document_root"]."/.htpasswd_stats\nrequire valid-user";
                        file_put_contents($data["new"]["document_root"].'/web/stats/.htaccess',$ht_file);
                        chmod($data["new"]["document_root"].'/web/stats/.htaccess',0755);
                        unset($ht_file);
                }
It starts at line 818 and ends at 825. You can just copy and paste this in if you want you can look at the changes that I have made to it.
Reply With Quote
The Following User Says Thank You to dclardy For This Useful Post:
falko (8th April 2010)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel 82815 Video Card & Ubuntu 8.10 harvey527 Kernel Questions 8 5th November 2010 15:51
Admin Program for Virtual Users and Domains Postfix courier etc...(Ubuntu 8.04)? the1rob HOWTO-Related Questions 11 4th August 2009 05:54
Default Mail scan settings for new users timehost Installation/Configuration 3 26th October 2007 13:05
Exim MTA dazblade Server Operation 4 16th July 2007 19:42
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs pontifex HOWTO-Related Questions 2 26th October 2005 18:54


All times are GMT +2. The time now is 13:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.