How to avoid directory listing on port 8081?

Discussion in 'Installation/Configuration' started by conny2540, Jun 13, 2019.

  1. conny2540

    conny2540 Member

    If I try to connect the server by IP than it redirects to my main website. This is ok. But when I connect the server by IP adding the port 8081 then it shows the index of directory. You cannot browse there, what is ok, but I want to redirect this site instead of index-listing to a forbidden. Is this possible ? If yes, how to ? In use debian 9 with apache.
    EDIT: forgot to say that I managed it by accessing via IP on the browser, but cannot manage it by accessing it via VPShost. Still showing index of/ site.
    Rule added: Added new file at /etc/apache2/sites-available/ with this code
     <VirtualHost *:8081>
        ServerName (IP of the server)
        Redirect 403
        DocumentRoot /dev/null
    But when I add the same rule with VPShost address it does not work. Should this port accessible by default without password ? For port I opened for ispconfig (VPShost:8080) it is ok, but for the apps port I don't think it's good to have access to the index. Or it is this indifferent ?
    Last edited: Jun 13, 2019
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The apps vhost index contains nothing critical, so I don't see any issues with having a directory listing for it. The apps vhost does not define this listing anyway, it's just the default of the web server (os), so if you change the default, it should apply to the apps vhost too.
  3. conny2540

    conny2540 Member

    OK. Thank you.

Share This Page