Question htaccess protection on ispadmin login page

Discussion in 'Installation/Configuration' started by bongo, May 11, 2009.

  1. bongo

    bongo New Member

    Hello,

    ispconfig 3 is really great.

    is it possible to setup an additional htaccess directory protection to the isp admin login?

    if yes, in what directory i have to place the files .htaccess and .htpasswd ?

    Thank you for your help.

    Bongo
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you can use .htacces protection if you like. The files have to be in /usr/local/ispconfig/interface/web/
     
  3. bongo

    bongo New Member

    Hello Till,

    thank you for your fast reply. I copied both files into the folder, but it is still not working.


    .htaccess:

    AuthUserFile /usr/local/ispconfig/interface/web/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Adminarea"
    AuthType Basic
    <Limit GET>
    require valid-user
    </Limit>


    .htpasswd is in the same folder with correct user and password



    in var/www/domain web folders it is working without problems...


    any ideas?

    Thank you
     
  4. falko

    falko Super Moderator ISPConfig Developer

    What's in the ISPConfig vhost configuration file (on Debian it'S in /etc/apache2/sites-available)?
     
  5. bongo

    bongo New Member

    Hello Falko,

    thx for taking the time looking into this. i use centos 5.3.

    /etc/httpd/conf/sites-enabled/

    000-ispconfig.conf
    000-ispconfig.vhost



    vhost file:


    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################

    Listen 9091
    NameVirtualHost *:9091

    <VirtualHost _default_:9091>
    ServerAdmin webmaster@localhost

    <IfModule mod_fcgid.c>
    DocumentRoot /var/www/ispconfig/
    SuexecUserGroup ispconfig ispconfig
    <Directory /var/www/ispconfig/>
    Options Indexes FollowSymLinks MultiViews +ExecCGI
    AllowOverride AuthConfig Indexes Limit Options FileInfo
    AddHandler fcgid-script .php
    FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
    Order allow,deny
    Allow from all
    </Directory>
    </IfModule>

    <IfModule mod_php5.c>
    DocumentRoot /usr/local/ispconfig/interface/web/
    AddType application/x-httpd-php .php
    <Directory /usr/local/ispconfig/interface/web>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    php_value magic_quotes_gpc 0
    </Directory>
    </IfModule>

    # ErrorLog /var/log/apache2/error.log
    # CustomLog /var/log/apache2/access.log combined
    ServerSignature Off

    </VirtualHost>

    <Directory /var/www/php-cgi-scripts>
    AllowOverride None
    Order Deny,Allow
    Deny from all
    </Directory>

    <Directory /var/www/php-fcgi-scripts>
    AllowOverride None
    Order Deny,Allow
    Deny from all
    </Directory>
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Change
    Code:
    <IfModule mod_php5.c>
    DocumentRoot /usr/local/ispconfig/interface/web/
    AddType application/x-httpd-php .php
    <Directory /usr/local/ispconfig/interface/web>
    Options FollowSymLinks
    AllowOverride [B][COLOR="Red"]None[/COLOR][/B]
    Order allow,deny
    Allow from all
    php_value magic_quotes_gpc 0
    </Directory>
    </IfModule>
    to
    Code:
    <IfModule mod_php5.c>
    DocumentRoot /usr/local/ispconfig/interface/web/
    AddType application/x-httpd-php .php
    <Directory /usr/local/ispconfig/interface/web>
    Options FollowSymLinks
    AllowOverride [B][COLOR="Red"]AuthConfig[/COLOR][/B]
    Order allow,deny
    Allow from all
    php_value magic_quotes_gpc 0
    </Directory>
    </IfModule>
     
  7. bongo

    bongo New Member

    It is working now.
    Thank you very much!
     

Share This Page