Show folder structure instead of 403 error

Discussion in 'Installation/Configuration' started by Gaston Girardi, Sep 4, 2023.

  1. Gaston Girardi

    Gaston Girardi Member HowtoForge Supporter

    Hi Guys i have a special request and its internal, not for a client. For a special project we need on an special link to show the folder structure instead of the error 403, but there is only for this specific site, how we can do that?.

    The important thing to consider is that the content of that folder wil change, becuse someone is going to upload files regularly.

    Thanks a lot.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use Apache or Nginx web server?
     
  3. Gaston Girardi

    Gaston Girardi Member HowtoForge Supporter

    Sorry i forgot to put the info of my server.

    I use Apache on Debian 10
     
  4. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    403 is when indexes are disabled and the folder is either empty, or has no file matching the list of default files for apache to use in a folder (DirectoryIndex index.php index.html ... index.pl)

    you can try allowing indexes in the apache directives for the site.. eg:
    Code:
    <Directory /var/www/<mysite.tld>/web/>
            Options +Indexes
            AllowOverride None
            Require all granted
    </Directory>
    
    assuming it's not already globally disabled and override blocked in the apache main config for security purposes...
     
  5. Gaston Girardi

    Gaston Girardi Member HowtoForge Supporter

    I try this and didn't work, of course, i replace the <mysite.tld> for the correct path of my site.

    But this configuration i put it on the option tab inside the website in the panel, or i should have put this in other place?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You must put this into the Apache directives field on the options tab of the website. If this does not work, try replacing the path
    /var/www/<mysite.tld>/web/ (which is the symlinked path) with the real path of the site like /var/www/clients/clientX/webX/web/
     
  7. Gaston Girardi

    Gaston Girardi Member HowtoForge Supporter

    Hi @till i've already try this but is not working, this is the code y put in the Apache directives field
    Code:
    <Directory /var/www/clients/clientX/webXXX/web>
            Options +Indexes
            AllowOverride None
            Require all granted
    </Directory>
    And latter i try with th symlink

    Code:
    <Directory /var/www/xx.mydomain.tld/web>
            Options +Indexes
            AllowOverride None
            Require all granted
    </Directory>
    But as i told none of these work
     
  8. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    firstly you should check the /etc/apache2/sites-available folder... make sure there's no .err file for the vhost.. if there is, there's something in the configuration it doesn't like.. no idea what, doesn't look to be anything wrong with what you show as being added..

    otherwise, check the main apache2 configurations themselves.. Indexes might have been disabled globally, and overriding it blocked...
     
  9. Benedict

    Benedict New Member HowtoForge Supporter

    Gaston Girardi and till like this.

Share This Page