Welcome to WebmasterWorld Guest from 54.159.50.111

Forum Moderators: phranque

Message Too Old, No Replies

How to change the default awstats access URL

     
11:13 pm on Jul 16, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 7, 2004
posts: 88
votes: 0


Hi, I've go Awstats installed on my site but it's available to public by accessing mysite.com/stats. How can I change that URL or make the stats private so no one else can access them? I've got full root access and permissions in the server, which uses DirectAdmin panel.

Thanks in advance!

PS. I'm not sure it I should have posted in other board, please move it if necessary. ;)

11:35 pm on July 16, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


i would use HTTP Basic Authentication to protect that directory.
if you are on an apache server you can use mod_auth [httpd.apache.org] for this.

edit reason: spelling

[edited by: phranque at 3:20 am (utc) on July 20, 2009]

9:02 pm on July 19, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 7, 2004
posts:88
votes: 0


Thanks, but if you mean using the htaccess file for this, is not possible, because I have disabled its usage serverwide to increase performance. Is there some way to protect the dir without using htaccess files?
3:30 am on July 20, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


the relevant mod_auth directives also work in directory context so you can put this in an appropriate <Directory> section of your apache config file.
you might also consider using mod_access [httpd.apache.org] using the Allow or Deny directives for your solution - which also works in directory context.
9:58 am on July 21, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:July 29, 2007
posts:1549
votes: 11


Another option, edit awstats.conf

AllowAccessFromWebToFollowingIPAddresses="your IP here".

edit: you might also look into password protecting the entire folder via your file manager.

10:54 am on July 21, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


the awstats configuration option is ok if you are always accessing your stats from a fixed IP address.
are there other more flexible options otherwise?

you might also look into password protecting the entire folder via your file manager.

did you mean to protect the folder from the web server?
this will make it unavailable to all regardless of authorization/access
12:14 pm on July 23, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 7, 2004
posts: 88
votes: 0


Thanks! The mod_auth directives worked perfectly and I created the .htpasswd file in a safe location outside the public_html folder. I'm glad there's always people willing to help in this community, I really appreciate your dedication. :)