Disable directory listing

Discussion in 'Server Operation' started by pkaresz11, Jan 3, 2017.

  1. pkaresz11

    pkaresz11 New Member

    Hi,
    the directory listing is enable by default on Ubuntu 16.04-ISPconfig3.1.
    How can I disable it as default for all website?
    Thx
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    a2dismod autoindex
    service apache2 restart
    ?
     
  3. pkaresz11

    pkaresz11 New Member

    Thanks Florian!it's work but i get 404 error instead of 403 forbidden.it's okay?
     
  4. alisik

    alisik Banned

    nope its not ok; ISPC should redirect you to error page instead.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This can be absolutely ok. You will get a 403 when you try to access a folder without index file when directory listing is off. But if you try to access a file and this files or the whole folder does not exist, then you will get a 404.

    403 is the error code on the error page. And not ISPConfig is directing anything, ISPConfig is a hosting Control Panel and not a http server, redirections are handled by the web server (either apache or nginx).
     
  6. alisik

    alisik Banned

    @till yes its CP, but it should have a place for defining error pages for use by webserver
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please do not claim things as facts again that you don't know.

    1) Defining custom error pages is not the topic of this thread and not related to the original question. You clutter the thraed of the thread starter here with off topic discussions.
    2) ISPConfig has a custom error pages option in the website settings and that's on by default, so a website ower can customize them if he wants to do that.
    3) Yes, and you can also customize these error pages in a central place like any other config file or template used in ISPConfig.
     
  8. alisik

    alisik Banned

    @till read this topic from #3 to the end and (lets hope) you will understand where discussion on error pages originated from.
     

Share This Page