Override error 403 using .htaccess

Discussion in 'Installation/Configuration' started by dodimar, Nov 18, 2009.

  1. dodimar

    dodimar New Member

    Hi,

    Was trying to create a folder where I can use .htaccess to require user to login to access the folder. I was able to create the .htaccess things. However, after logging in, ISPconfig spits out a ERROR 403 Forbidden!

    Any way I can override this?

    Thanks.
     
  2. falko

    falko Super Moderator

    Can you post the vhost configuration? Is there an index file in the web folder?
     
  3. dodimar

    dodimar New Member

    There are no index file in the web folder since I just want to put files on it that some users can access.

    Will post the vhost config later, I can't ssh from our office.
     
  4. dodimar

    dodimar New Member

    This is the vhost of that specific domain.

    Code:
    <Directory /var/www/domain.tld>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <VirtualHost *:80>
        DocumentRoot /var/www/clients/client3/web9/web
    
        ServerName domain.tld
        ServerAlias *.domain.tld
        ServerAdmin webmaster@domain.tld
    
        ErrorLog /var/log/ispconfig/httpd/domain.tld/error.log
    
        ErrorDocument 400 /error/400.html
        ErrorDocument 401 /error/401.html
        ErrorDocument 403 /error/403.html
        ErrorDocument 404 /error/404.html
        ErrorDocument 405 /error/405.html
        ErrorDocument 500 /error/500.html
        ErrorDocument 503 /error/503.html
    
        <Directory /var/www/domain.tld/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
        <Directory /var/www/clients/client3/web9/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    
        # suphp enabled
        <Directory /var/www/clients/client3/web9/web>
            suPHP_Engine on
            # suPHP_UserGroup web9 client3
            AddHandler x-httpd-suphp .php .php3 .php4 .php5
            suPHP_AddHandler x-httpd-suphp
        </Directory>
    
    
    </VirtualHost>
    
     
  5. falko

    falko Super Moderator

    That's the problem. Either put an index file in the directory, or add Indexes to the Options directive of that vhost - see http://httpd.apache.org/docs/2.2/mod/core.html#options
     
  6. dodimar

    dodimar New Member

    Okay.. got it now.. Thank you very much.
     

Share This Page