Protected Directories

Discussion in 'General' started by Korsch, Feb 23, 2023.

  1. Korsch

    Korsch New Member

    I everything set up on my server following this tutorial
    Code:
    https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/
    I have ISPConfig set up with a subdomain cp.domain.ca then also through the Admin account Ive set up my main site domain.ca. When I tried to view the web stats at domain.ca/stats/ I was brought to a Protected Directory page asking for a username and password, I of course just tried my admin details which brought me to a 403 error page. where can these details be found for directory permission? also now I cant access the directory unless I use incognito.
     

    Attached Files:

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Statistics are available 24 hours after you started using the site (after the site gets visitors). Until then, you get a permission error as there are no statistics available yet. the password for the statistics is set on the stats tab of the website settings.
     
    ahrasis and Korsch like this.
  3. remkoh

    remkoh Active Member HowtoForge Supporter

    If you want your stats available without a password but not publicly available, only to specific ip's ...

    Apache:
    Add this in your website settings under the Options tab >> Apache directives
    Code:
    <Location /stats>
        Require ip 12.34.556.78
        Require ip 98:76:54:32
    </Location>
    
    Nginx:
    Add this in your website settings under the Options tab >> Nginx directives
    Code:
    location /stats {
        allow 12.34.556.78;
        allow 98:76:54:32;
        deny all;
    }
    
     
    Korsch and ahrasis like this.
  4. Korsch

    Korsch New Member

    thank you remkoh, ill try this if after 24 hours it hasn't propagated.
     
    ahrasis likes this.
  5. remkoh

    remkoh Active Member HowtoForge Supporter

    It has no influance on the propagation of your stats.
    Just an alternative to restrict access to it.
    If your stats stil aren't propagated after 24h than there's something fundamentally wrong with your server installation.
     
  6. Korsch

    Korsch New Member

    Stats are working and the login page isn't being prompted either now.
     
    remkoh and ahrasis like this.

Share This Page