Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th April 2008, 08:20
make-fun make-fun is offline
Member
 
Join Date: Jan 2008
Posts: 92
Thanks: 8
Thanked 8 Times in 7 Posts
Default .htaccess in /ispconfig/web/ doesn't work

Hi folks,

I've got a bit of a problem with a .htaccess I'd like to place in
Code:
/home/admispconfig/ispconfig/web/roundcubemail
where I wanna protect the web mail.

.htaccess
Code:
AuthType Basic
AuthName "Members Only"
AuthUserFile /home/admispconfig/ispconfig/web/roundcubemail/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>
.htpasswd
Code:
Webmail:nW1jrA3rke5EI
Sys
Code:
Ubuntu 6.06 Perfect Set Up & ISPConfig Version: 2.2.21
Adminpanel is available at https…

/ispconfig/httpd/conf/httpd.conf_https
Code:
# AccessFileName: The name of the file to look for in each directory
# for access control information.
#
AccessFileName .htaccess
Just don't see anything wrong, really

Cheers
Reply With Quote
Sponsored Links
  #2  
Old 18th April 2008, 10:46
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

The config file for apache is /ispconfig/httpd/conf/httpd.conf, the file /ispconfig/httpd/conf/httpd.conf_https is just a copy which is not used by apache.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 18th April 2008, 10:49
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Probably .htaccess files are not allowed on your system.
You can add the following to the Apache directives field of your website:

<Directory "/var/www/web1/web">
Options FollowSymLinks
AllowOverride All
</Directory>

Where, web1 is your own webnumber.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
The Following 2 Users Say Thank You to Hans For This Useful Post:
Dennis (22nd June 2008), mspIggy (9th July 2008)
  #4  
Old 19th April 2008, 00:47
make-fun make-fun is offline
Member
 
Join Date: Jan 2008
Posts: 92
Thanks: 8
Thanked 8 Times in 7 Posts
Default

Thanks Hans,
but I'm in the ISPConfig/Admin Panel web — not a web site.
Edit:I also testet the files in a web site and they're working there no probs /Edit

As for the /ispconfig/httpd/conf/httpd.conf(out of the box)
Code:
<Directory "/home/admispconfig/ispconfig/web">

    Options FollowSymLinks MultiViews

    AllowOverride None

    Order allow,deny
    Allow from all
</Directory>

and…
# AccessFileName: The name of the file to look for in each directory
# for access control information.
#
AccessFileName .htaccess
In my earlier post I forgot to mention I had checked this one too… as I thought it looked good I went ahead and checked the httpd.conf_https — for a lack of ideas I admit

Cheers

Last edited by make-fun; 19th April 2008 at 01:53.
Reply With Quote
  #5  
Old 19th April 2008, 10:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Please change the line:

AllowOverride None

to:

AllowOverride Indexes AuthConfig Limit FileInfo

in the file:

/ispconfig/httpd/conf/httpd.conf

and then run:

/etc/init.d/ispconfig_server restart
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 22nd April 2008, 05:15
make-fun make-fun is offline
Member
 
Join Date: Jan 2008
Posts: 92
Thanks: 8
Thanked 8 Times in 7 Posts
Default

Yes, that was the missing bit… I figured it, when I checked /etc/apache2/apache2.conf again…
So it's all good now — but didn't really think this would be the default settings of ispconfig, anyway.
Reply With Quote
  #7  
Old 23rd April 2008, 03:45
make-fun make-fun is offline
Member
 
Join Date: Jan 2008
Posts: 92
Thanks: 8
Thanked 8 Times in 7 Posts
Default

Hi Till, can you maybe enlighten me on this .htaccess thing.

As stated in my last post I got it to work, so everyone using the webmail had to authenticate first.

Today I then used Hans' new "RoundCube 0.1.1 package", which now came with it's own .htaccess containing:
Code:
# AddDefaultCharset  UTF-8
AddType text/x-component .htc

#<IfModule mod_php4.c>
#  php_flag display_errors Off
#  php_flag log_errors  On
#  php_value   error_log   logs/errors
#  php_value   upload_max_filesize  5M
#  php_value   post_max_size  6M
#  php_value   memory_limit   64M
#  php_value   session.auto_start   0
#  php_value   zlib.output_compression 0
#  php_value   magic_quotes_gpc  0
#</IfModule>

<IfModule mod_php5.c>
  php_flag  display_errors Off
  php_flag  log_errors  On
  php_value error_log   logs/errors
  php_value upload_max_filesize  5M
  php_value post_max_size  6M
  php_value memory_limit   64M
  php_value session.auto_start   0
  php_value zlib.output_compression 0
  php_value magic_quotes_gpc  0
</IfModule>

<FilesMatch "(\.inc|\~)$">
  Order allow,deny
  Deny from all
</FilesMatch>

Order deny,allow
Allow from all
Which resulted in:
Code:
[Wed Apr 23 02:41:41 2008] [alert] [client ] /home/admispconfig/ispconfig/web/roundcubemail/.htaccess: php_flag not allowed here
[Wed Apr 23 02:41:57 2008] [alert] [client ] /home/admispconfig/ispconfig/web/roundcubemail/.htaccess: php_flag not allowed here
[Wed Apr 23 02:44:13 2008] [alert] [client ] /home/admispconfig/ispconfig/web/roundcubemail/.htaccess: php_flag not allowed here
So back to "/ispconfig/httpd/conf/httpd.con" and
Code:
AllowOverride None
#AllowOverride Indexes AuthConfig Limit FileInfo
So now the roundcubemail works, but I don't have the authentication anymore. Is there any way to have both, I'm wondering??

Cheers
Reply With Quote
  #8  
Old 23rd April 2008, 09:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Set AllowOverride to:

AllowOverride All

and restart ISPConfig.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 23rd April 2008, 20:53
DantePasquale DantePasquale is offline
Senior Member
 
Join Date: Feb 2007
Location: Lakewood, OH US
Posts: 107
Thanks: 10
Thanked 3 Times in 3 Posts
Send a message via AIM to DantePasquale
Default .htaccess in /ispconfig/web/ doesn't work

Hi All, I had a similar problem that resulted in a bad situation. I added the block provided with RoundCube to the ISPConfig Site panel where you can add Apache Directives. I accidentally hit <Enter> before finishing editing the block of directives and somehow /etc/group was wiped clean and a new /etc/postfix/virtualusertable was created. Luckily the virtualusertable was the same as the old one, and I had a good backup of /etc/group, but I really don't know what happened here and am a bit concerned about doing any more admin work.

Should I be concerned?

Here's the block of directives:

Code:
<Directory "/var/www/web1/web">
Options FollowSymLinks
AllowOverride All
</Directory>
I hadn't replaced web1/web with the correct path.

I really don't see how this would be destructive, except of there's a symlink to /etc/group somewhere

And here's the ispconfig.log

Code:
23.04.2008 - 14:05:42 => INFO - Signalfile Set: insert
23.04.2008 - 14:05:46 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 257: setquota -g web2 0 0 0 0 -a &> /dev/null
23.04.2008 - 14:05:46 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 258: setquota -T -g web2 604800 604800 -a &> /dev/null
23.04.2008 - 14:05:46 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 277: Connected successfully
23.04.2008 - 14:05:46 => INFO - USER:
web2_webmailmgr:x:10001:10002:Cocoanet Webmail Administrator:/var/www/web2:/bin/bash
23.04.2008 - 14:05:46 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 905: setquota -u web2_webmailmgr 0 0 0 0 -a &> /dev/null
23.04.2008 - 14:05:46 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 906: setquota -T -u web2_webmailmgr 604800 604800 -a &> /dev/null
23.04.2008 - 14:05:46 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web2/.forward
23.04.2008 - 14:05:46 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 117: symlink /var/www/web2/Maildir
23.04.2008 - 14:05:47 => INFO - USER:
web2_dantebell:x:10002:10002:Dante Bell:/var/www/web2/user/web2_dantebell:/bin/false
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 905: setquota -u web2_dantebell 1048576 1049600 0 0 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 906: setquota -T -u web2_dantebell 604800 604800 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web2/user/web2_dantebell/.forward
23.04.2008 - 14:05:47 => INFO - USER:
web2_dantepasquale:x:10003:10002:Dante Pasquale:/var/www/web2/user/web2_dantepasquale:/bin/false
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 905: setquota -u web2_dantepasquale 1048576 1049600 0 0 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 906: setquota -T -u web2_dantepasquale 604800 604800 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web2/user/web2_dantepasquale/.forward
23.04.2008 - 14:05:47 => INFO - USER:
web2_donziguy:x:10004:10002:Donzi Guy:/var/www/web2/user/web2_donziguy:/bin/false
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 905: setquota -u web2_donziguy 1048576 1049600 0 0 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 906: setquota -T -u web2_donziguy 604800 604800 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web2/user/web2_donziguy/.forward
23.04.2008 - 14:05:47 => INFO - USER:
web2_bcbgirl:x:10005:10002:Joanie Amato:/var/www/web2/user/web2_bcbgirl:/bin/false
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 905: setquota -u web2_bcbgirl 2097152 2098176 0 0 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 906: setquota -T -u web2_bcbgirl 604800 604800 -a &> /dev/null
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web2/user/web2_bcbgirl/.forward
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 137: cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
23.04.2008 - 14:05:47 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 284: cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
23.04.2008 - 14:05:48 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 289: WARNING: could not postmap hash:/etc/postfix/virtusertable
23.04.2008 - 14:05:48 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1259: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
23.04.2008 - 14:05:48 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_bind.lib.php, Line 295: cp -fr /etc/bind/pri.cocoanet.us /etc/bind/pri.cocoanet.us~
23.04.2008 - 14:05:51 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/bind9 restart &> /dev/null
23.04.2008 - 14:05:51 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2022: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
23.04.2008 - 14:05:52 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 137: cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
23.04.2008 - 14:05:52 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 284: cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
23.04.2008 - 14:05:53 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 289: WARNING: could not postmap hash:/etc/postfix/virtusertable
23.04.2008 - 14:05:53 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1259: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
23.04.2008 - 14:05:53 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2022: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
Also, now I'm getting the entry:

Code:
postfix/trivial-rewrite[12994]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
I think you fix this by running:

Code:
postmap hash virtualusertable - but I'm not sure.
Reply With Quote
  #10  
Old 23rd April 2008, 20:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
 
Default

Editing the apache directives yould not have caused this, as the apache directives are not connected to the users. The ispconfig.log looks fine too.

Please check your group file syntax with:

grpck
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
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
.htaccess Liac Server Operation 15 20th June 2007 15:19
.htaccess functionality does not work kalikoder Installation/Configuration 7 13th April 2007 08:29
can't make work joomla + sef + .htaccess bochenn General 9 4th April 2007 13:47
wordpress MU and ISPconfig .htaccess isues palkat General 4 18th October 2006 11:57
.htaccess login challenge broken with mod_rewrite ozonblue Installation/Configuration 2 13th September 2006 10:09


All times are GMT +2. The time now is 00:08.


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