LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to get mail alert when http path /var/www/html get accessed (https://www.linuxquestions.org/questions/linux-server-73/how-to-get-mail-alert-when-http-path-var-www-html-get-accessed-893850/)

saravanakumar 07-26-2011 08:57 AM

how to get mail alert when http path /var/www/html get accessed
 
Dear Sir.
i had set passwd for http path admin by using these command


htpasswd -c /etc/httpd/conf/.htpasswd admin

and made password attentication by using


cat >> /var/www/html/admin/html/.htaccess << EOF
AuthUserFile /etc/httpd/conf/.htpasswf
AuthName "please enter password"
AuthType Basic
<Limit GET POST>
require user admin
</Limit>
EOF




BUT I COULD INT ABLE TO GET MAIL ALERT WHEN THE PATH
/var/www/html/admin get accessed by someusers like ,modified.edited,deleted the path
can somebody help me how can i resolve the problem


THanks&regards
saravanakumar

TB0ne 07-26-2011 03:45 PM

Quote:

Originally Posted by saravanakumar (Post 4425532)
Dear Sir.
i had set passwd for http path admin by using these command

htpasswd -c /etc/httpd/conf/.htpasswd admin

and made password attentication by using

cat >> /var/www/html/admin/html/.htaccess << EOF
AuthUserFile /etc/httpd/conf/.htpasswf
AuthName "please enter password"
AuthType Basic
<Limit GET POST>
require user admin
</Limit>
EOF

BUT I COULD INT ABLE TO GET MAIL ALERT WHEN THE PATH
/var/www/html/admin get accessed by someusers like ,modified.edited,deleted the path
can somebody help me how can i resolve the problem

Don't shout, and again there are NOT JUST SIRS on this site.

What do you think that .htaccess will do, based on what you've done? All that will do is ask for user ID/password. And again, your questions aren't very clear. What kind of access are you attempting to get notified on? Each web page hit (which is what .htaccess is for), or every time someone goes into that directory via terminal? The two are different.

If you want notification on a web page hit, either code your web page to send an email when someone logs in to it, or read the apache logs and parse them out, and email you from that program. SSH/terminal access? Either buy Tripwire (or another similar product) to watch the files and alert you, or write your own to look at modification dates/times on the file(s) in question, and email you.

Again, you need to ask a clear question, and post some follow up, which you've not done in alot of your previous threads.


All times are GMT -5. The time now is 02:14 PM.