apache access logging
Results 1 to 4 of 4

Thread: apache access logging

  1. #1
    Priapistic Monk KorpDeath's Avatar
    Join Date
    Dec 2001
    Posts
    2,628

    apache access logging

    So let's say, for instance, I have an Earthlink website and I want to control access to directories in that website by username, in other words when bill logs in I want him to be limited to his own directory. I can edit the htaccess and htgroup files only but I don't believe I have syslog access, and I don't have shell access.

    Here's what I want to do....
    I'm looking to capture the username of people who login to the website. I'd like to pass this to a perl script that will create an account and limit access to thier own home directory. How can I capture that info. (I know this info is in /usr/local/apache/logs/www.blah_access_logs which makes it tough but possible.)
    I'm hoping someone here has a trick to get this info. Anybody?
    Mankind have a great aversion to intellectual labor; but even supposing knowledge to be easily attainable, more people would be content to be ignorant than would take even a little trouble to acquire it.
    - Samuel Johnson

  2. #2
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,884
    I haven't done it.... currently learning actually, but I believe it can be done with session keys. Thats how most forums keep each users private messages seperate and things like that. Download some forum and look into how it does it. I am still learning exactly how to do it though, so I can't be much assistance.
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  3. #3
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    In the top-level directory, put in .htaccess

    Code:
    AuthUserFile (whatever the path to your user file is)
    Then in each subdirectory, say /alice
    Code:
    Require user alice
    and in directoy /bob
    Code:
    Require user bob
    Etc

    Then Alice won't be able to get into Bob's directory, and vice versa

    Slarty

  4. #4
    Priapistic Monk KorpDeath's Avatar
    Join Date
    Dec 2001
    Posts
    2,628
    First off thanks to both of you. Here's the deal I know how to use htaccess and htgroup, the deal is I need to get back from the webserver who logs in so that I can extract the username and create an account for them.

    I guess an easier question would be.... Are all of the login attempts logged anywhere other than the apache logs, is it in syslog? Do I need syslog access to see who logs in to the site?
    Mankind have a great aversion to intellectual labor; but even supposing knowledge to be easily attainable, more people would be content to be ignorant than would take even a little trouble to acquire it.
    - Samuel Johnson

Posting Permissions

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