how to allow directory for browsing thru ISPConfig ??

Discussion in 'Installation/Configuration' started by radim_h, Jan 27, 2007.

  1. radim_h

    radim_h Member HowtoForge Supporter

    Hello,
    i can't find how to allow directory for browsing
    i made directory "pub" in my www root (here for example www.mixx.org) but still can't make "http://www.mixx.org/pub" available for browsing.

    In ISP Site properties i have tried add parameters in Apache Directives (Optional):
    <Directory /var/www/www.mixx.org/web/pub>
    Options +Indexes
    Order allow,deny
    Allow from all
    AllowOverride AuthConfig
    </Directory>

    also path /var/www/web4/web/pub doesn't work

    The first way may be more understandable for customers... but it doesn't matter so much. I need customers to set browsing options by themselves.

    Any idea please ???
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What'S in your Vhosts_ispconfig.conf?
    What's the output of
    Code:
    ls -la /var/www/www.mixx.org/web/pub
    ?
     
  3. radim_h

    radim_h Member HowtoForge Supporter

    ls -la /var/www/www.mixx.org/web/pub
    total 12
    drwxrwxrwx 3 web4_rh web4 4096 Jan 27 17:05 .
    drwxrwxr-x 6 web4_rh web4 4096 Jan 28 00:07 ..
    drwxr-xr-x 2 web4_rh web4 4096 Jan 25 11:26 Some_dir


    Vhosts_ispconfig.conf includes:


    #
    #
    ######################################
    # Vhost: www.mixx.org:80
    ######################################
    #
    #
    <VirtualHost 81.0.199.76:80>
    <Directory '/var/www/www.mixx.org/web/pub'>
    Options +Indexes
    </Directory>
    ServerName www.mixx.org:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web4/web
    ServerAlias www.simplecut.org mixx.org
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ErrorLog /var/www/web4/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode Off
    Alias /error/ "/var/www/web4/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    #
     
    Last edited: Apr 16, 2007
  4. falko

    falko Super Moderator ISPConfig Developer

    Please try
    Code:
    <Directory /var/www/www.mixx.org/web/pub>
    Options +Indexes
    </Directory>
    instead of
    Code:
    <Directory '/var/www/www.mixx.org/web/pub'>
    Options +Indexes
    </Directory>
     
  5. radim_h

    radim_h Member HowtoForge Supporter

    still not working :(

    403 Error- Forbidden!

    The following error occurred:

    You are not permitted to access the requested URL

    Please contact the Webmaster with any queries.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Do you have this at the end of your main Apache configuration file (right before Vhosts_ispconfig.conf gets included)?

    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>
     
  7. radim_h

    radim_h Member HowtoForge Supporter

    httpd.conf

    Yes, this is how the end of httpd.conf looks

    ###############ispconfig_log###############
    LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
    CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig

    <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>

    <Directory /var/www/*/user/*/web>
    Options +Includes -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>

    <Directory /var/www/*/cgi-bin>
    Options ExecCGI -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>

    Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Can you try
    Code:
    <Directory /var/www/www.mixx.org/web/pub>
    Options +Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>
    in the Apache Directives field instead of

    Code:
    <Directory /var/www/www.mixx.org/web/pub>
    Options +Indexes
    </Directory>
    ?
     
  9. radim_h

    radim_h Member HowtoForge Supporter

    tried

    none of directions above works,
    does it mean there is no way to allow directory browsing in ISPConfig ?
    :eek:
     
  10. edge

    edge Active Member Moderator

    I've just tested it, and all I needed was to add the following to the ISP Management > Apache Directives:

    Code:
    <Directory "/var/www/web28/web">
    Options +Indexes
    </Directory> 
    
    I can now brows any directory (within web28/web) that has no index.html or index.php in it.
     
  11. radim_h

    radim_h Member HowtoForge Supporter

    Thank you

    It works now! The error seems to be between keyboard and the chair :)
     
  12. radim_h

    radim_h Member HowtoForge Supporter

    Should it work with domain name?

    as i found now after same time:
    it works in format:
    <Directory "/var/www/web28/web">
    Options +Indexes
    </Directory>

    But why it doesnt work in format
    <Directory "/var/www/www.mixx.org/web">
    Options +Indexes
    </Directory>

    Why when all webXX in /var/www have symbolic links to domain name ?

    I also tried it like this
    <Directory /var/www/www.mixx.org/web/pub>
    Options +Indexes FollowSymLinks
    AllowOverride All
    </Directory>

    But it's not working either.

    Using domain names can be helpfull for users who doesnt know web_number, because i'm using prefix [DOMAIN]_ and laso planing use hack for mysql names..
     
  13. falko

    falko Super Moderator ISPConfig Developer

Share This Page