Results 1 to 13 of 13

Thread: Stats with subdirectories & pointers

  1. #1

    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    15

    Stats with subdirectories & pointers

    For years I've had just one domain on my powweb account and my main index.html was in my /htdocs/ folder. Now I have added more domains and made a subdirectory in the /htdocs/ folder, and setup a pointer (using the DomainCentral tool in ops) to each directory. It looks like this:

    domain1 points to /htdocs/domain1folder
    domain2 points to /htdocs/domain2folder
    etc...

    I've been using Awstats for a long time and it doesn't seem to have noticed the directory change. It's still logging traffic to /htdocs/domain1folder, but I don't think it's logging anything to the other domain folders.

    Can someone explain this and how I might log traffic (ideally separately) to each of my domains?

    Thanks!

  2. #2
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    Not in Solomons anymore.
    Posts
    3,441
    Rep Power
    21
    Awstats (the copy available here anyway) will record activity only for ones primary account, and anything in it, such as htdocs/domain1folder and htdocs/domain2folder.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  3. #3

    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    15
    I believe what's happening is that awstats is counting any traffic to /htdocs/domain1folder/index.html and /htdocs/domain2folder/index.html as the same url so they're getting lumped together.

    I searched and fount this thread: http://forums.powweb.com/showthread....e+domain+stats

    Post #33 seems (pasted below) to give a solution in modifying .htaccess. Unfortunetely, while I understand the point of the change, I don't really understand the htaccess instructions. Maybe someone could give me slightly more help.

    This is what I did. The first thing to do is to add the domain to .htaccess in the top level htdocs directory. So in the /htdocs/.htaccess of my account, I have the following lines:
    Code:
    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www\.67knots\.com$ [NC]
    RewriteCond %{REQUEST_URI} !^/67knots/ [NC]
    RewriteRule ^(.*) /67knots/$1 [L]
    [ The last 3 lines are repeated for each of the domains ]

    And I have a directory /htdocs/67knots where the contents of this www.67knots.com actually sit. With the above lines inserted in the top level .htaccess, going to www.67knots.com brings up the site, and although the browser may not show it, the real url of the main site is not http://www.67knots.com/ but http://www.67knots.com/67knots/ and URI for all pages inside it is forced to start with /67knots/. All scripts in the site are appropriately configured.

    Now these pages are picked up by stats, all pages in the Pages-URL section will be easily identifiable because of the /67knots/. There's a little bit of manual work involved beyond that - copying that list and separating the domains - but it gets the job done.

  4. #4
    Former Spam Filter (EU) IanS's Avatar
    Join Date
    Mar 2004
    Location
    Washington (THE original UK one!)
    Posts
    12,964
    Rep Power
    30
    I can't give a detailed breakdown of the htaccess but the purpose is to create the necessary changes to have the various domains/sites identifiable via the directory they're in. The last sentence explains that, that extra work is still needed to separate out the various domains/sites from the stats.
    This is a Powweb customer
    helping Powweb customer forum.

    I am a customer just like you!!

    Some matters can only be answered by staff or support.
    Give it a go - ask here first!

  5. #5

    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    15
    I tried implementing the htaccess code pasted about, but with my domains. It didn't work. I'm trying to read about htaccess instructions now but it's going painfully slow for someone who has never done this stuff.

  6. #6
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    Not in Solomons anymore.
    Posts
    3,441
    Rep Power
    21
    Basically, whatever redirect code one uses in .htaccess will instruct a visitors browser that domain2.com points to htdocs/domain2folder. It will not have an effect on Awatstats however, as Awstats 'sees' things on a lower level than .htaccess.

    So, there is no way to have Awstats here see a difference between domain1.com (htdocs) and domain2.com (htdocs/domain2folder), the logs will just show everything as one.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  7. #7
    Custom User Title tpoynton's Avatar
    Join Date
    Sep 2004
    Location
    Mass
    Posts
    2,177
    Rep Power
    17
    You might consider using google analytics? I personally think it is better, and you can control better what traffic is associated with various domains.

  8. #8
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    Not in Solomons anymore.
    Posts
    3,441
    Rep Power
    21
    I use this 'access log' script, I've installed it into (uploaded it to) my account here. It's named Piwik, the website is - http://piwik.org/
    It works similar to google analytics, you insert j/s code into pages you want 'logged'. While it does rely on the user having j/s enabled, in that instance, there are one or two other 'methods' it can use. One is image tracking I believe. The thing I like about it is that it's installed on my webspace, IOW, if my website works, the logger script works. The more I use it the more I like it. There's a lot of different ways to see things..
    If you'd like to try it out and have some questions about it, feel free to ask me and I'll do my best to come up with some kind of answer for you.
    Last edited by snowmaker; 8-23-13 at 10:19 PM.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  9. #9
    Former Spam Filter (EU) IanS's Avatar
    Join Date
    Mar 2004
    Location
    Washington (THE original UK one!)
    Posts
    12,964
    Rep Power
    30
    Quote Originally Posted by invertedflight View Post
    I tried implementing the htaccess code pasted about, but with my domains. It didn't work. I'm trying to read about htaccess instructions now but it's going painfully slow for someone who has never done this stuff.
    You can't use both htaccess and the domain pointing together. As for stats, others have made good suggestions as the supplied version(s) don't do what you require, separate out domain hits.
    This is a Powweb customer
    helping Powweb customer forum.

    I am a customer just like you!!

    Some matters can only be answered by staff or support.
    Give it a go - ask here first!

  10. #10

    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    15
    Is the user who posted the .htaccess solution in the other thread simply wrong then? Hard to believe his posted solution didn't work when he said it did.

    There's no way awstats is going to lump together hits of files with different file names/paths, right? It's really just the 'root folder' index.html files that it will lump together because it isn't seeing the path before that file.

    Just to be clear, I'm not asking for separate log files, I just don't want hits from two different folders to toggle the same counter. I realize everything will end up in one log file, but at lease the folders/files will be parsed out individually in the list.

  11. #11
    Former Spam Filter (EU) IanS's Avatar
    Join Date
    Mar 2004
    Location
    Washington (THE original UK one!)
    Posts
    12,964
    Rep Power
    30
    Quote Originally Posted by invertedflight View Post
    Is the user who posted the .htaccess solution in the other thread simply wrong then? Hard to believe his posted solution didn't work when he said it did.
    No. The user didn't mention using the Powweb method of pointing domains.

    There's no way awstats is going to lump together hits of files with different file names/paths, right? It's really just the 'root folder' index.html files that it will lump together because it isn't seeing the path before that file.

    Just to be clear, I'm not asking for separate log files, I just don't want hits from two different folders to toggle the same counter. I realize everything will end up in one log file, but at lease the folders/files will be parsed out individually in the list.
    The parsing needs to be done by you and the post you're referring to indicates that.
    This is a Powweb customer
    helping Powweb customer forum.

    I am a customer just like you!!

    Some matters can only be answered by staff or support.
    Give it a go - ask here first!

  12. #12

    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    15
    What I was saying is that I'd only have one log file but at least it would increment different counters (and show it so) for the different domain hits.

    It seems to me that a simple/silly solution would be to have the index.html in /htdocs/domain2 forward to a page with any other name like schmindex.html. Then awstats would count that page uniquely since it has a different name, right?

    Or if pointer2 pointed to /htdocs/domain2, but I had all of the actual website contents in /htdocs/domain2/domain2 then every file accessed would have the /domain2/ path in front of it. Of course I'd have to forward the user to the subfolder and they would always see the extra path in their browser. I thought this is what the posted solution attempted to emulate in a more clever invisible way.

  13. #13
    Former Spam Filter (EU) IanS's Avatar
    Join Date
    Mar 2004
    Location
    Washington (THE original UK one!)
    Posts
    12,964
    Rep Power
    30
    Quote Originally Posted by invertedflight View Post
    I thought this is what the posted solution attempted to emulate in a more clever invisible way.
    My mistook. I missed that in the htaccess description.
    This is a Powweb customer
    helping Powweb customer forum.

    I am a customer just like you!!

    Some matters can only be answered by staff or support.
    Give it a go - ask here first!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •