1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

plesk-stat/ protecion

Discussion in 'Plesk for Linux - 8.x and Older' started by MaRiOs, Aug 6, 2005.

  1. MaRiOs

    MaRiOs Guest

    0
     
    Does anyone knows with what way plesk locks the plesk-stat/ folder?

    i made it locked from the hosting setup,
    then i went to Protected directories menu and its locked with my username and pass.

    But the point is i want to find out what way it uses.
    Icould say .htaccess by apache,but I cant find any .htaccess file in the folder....(when i was doing ls -la)

    so anyone knows how it locks the folder?
     
  2. dm__@

    dm__@ Guest

    0
     
    Protection is set up in the Apache config. Have a look at your vhosts/<servername>/conf/httpd.include.
     
  3. jamesyeeoc

    jamesyeeoc Guest

    0
     
    And the user/pwd files are kept in:

    /home/httpd/vhosts/domain.com/pd

    filenames such as: d..foldername
     
  4. MaRiOs

    MaRiOs Guest

    0
     
    ohhhh how didnt i thinked about that?lol
    thankx

    its in the :

    <Directory "/home/httpd/vhosts/domain.tld/httpdocs/plesk-stat">
    AuthType Basic
    AuthName "Domain statistics"
    AuthUserFile /home/httpd/vhosts/domain.tld/pd/d..plesk-stat
    require valid-user
    </Directory>
     
  5. MaRiOs

    MaRiOs Guest

    0
     
    Ok lets say...that i want to do this :

    I want to use this authentication to another folder /cgi-bin/locked/

    so each time a new account is created in plesk will be locked with the same attributes that the plesk-stat/ folder is.
    meaning that it will be locked with login (username of client) pass(pass of client).

    any ideas ?
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    'new account' meaning 'new domain' ?

    I assume you are trying to find a shortcut and not have to manually setup the protection each time you create a domain, right?

    Have to remember that the httpd.include file is overwritten by Plesk on occasion (like when you make changes to the domain).

    (here is one half-asleep thought)

    You would write a script to parse the httpd.include file (for all domains you wish this to be effective for) and insert those lines into the proper place in the file.

    Setup your script to run in the Event Manager upon domain creation.

    Also setup your script to run in CRON at intervals to reinsert the lines in case the httpd.include file gets overwritten.
     
  7. dm__@

    dm__@ Guest

    0
     
    There is better solution: /usr/local/psa/bin/protdir.sh, which allows you to protect directories as Plesk does. There is no need for manually parse/write configs, because this exactly what whole Plesk is about :)
     
  8. MaRiOs

    MaRiOs Guest

    0
     
    Hm.. Iwant... each time a new domain is created in the whole server,
    to make a .htaccess file (in a folder that i will put in the skeleton , named ¨locked¨ that will use as login/pass the same info that the plesk-stat folder uses.
    that means that the .htaccess file will look like this?? :

    AuthName anIdentifier
    AuthType Basic
    AuthUserFile /home/httpd/vhosts/domain.tld/pd/d..plesk-stat
    AuthGroupFile /dev/null
    <Limit GET POST>
    Require valid-user
    </LIMIT>

    So i think i need to put on te event manager a script tha will create that file and just put the right domain.tld name in the /home/httpd/vhosts/domain.tld/pd/d..plesk-stat path....

    any ideas ?
     
  9. jamesyeeoc

    jamesyeeoc Guest

    0
     
    You may want to try replacing the domain.tld with @domain_name@ which should be automatically replaced with the new domain's name by Plesk.
     
  10. MaRiOs

    MaRiOs Guest

    0
     
    so this would work right ? :)


    AuthName anIdentifier
    AuthType Basic
    AuthUserFile /home/httpd/vhosts/@domain_name@/pd/d..plesk-stat
    AuthGroupFile /dev/null
    <Limit GET POST>
    Require valid-user
    </LIMIT>
     
  11. jamesyeeoc

    jamesyeeoc Guest

    0
     
    I have not tried it and currently my test server is down due to testing out Acronis's software. But using the @domain_name@ tag in other files such as the skeleton index.html file works.

    As to the rest of your file contents, I have not even looked at that. I was just answering your question about being able to auto-replace the domain.tld
     
  12. MaRiOs

    MaRiOs Guest

    0
     
    ok then can u take a look on the rest?
     
Loading...