Solved

Set an expiration date to a directory on an Ubuntu server

Posted on 2012-04-10
4
376 Views
Last Modified: 2012-04-13
I have a section on my website that is privileged.  I would like to set an expiration date so that after a set time, the username and password will not work.

1.  Is this even possible
2.  Here is the snipet from my httpd.conf file

<Directory /var/www/restrict/websource>
      AuthType Basic
      AuthName "Web Edit"
      AuthUserFile /var/passwd/webpass
      AuthGroupFile /var/passwd/webgrp
      Require group webgrp
</Directory>

Thanks...
0
Comment
Question by:IGHQIT
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Maciej S
ID: 37831323
I don't think it's possible with apache.
I would create simple shell script, which will delete/lock (comment out) such user from your webpass file, and scheduled its run via cron/at.
0
 
LVL 4

Accepted Solution

by:
senseifedon earned 500 total points
ID: 37838211
Hi;
You can use mod_expire. Mod_expires link is: Apache mod_expires directives...
0
 

Author Closing Comment

by:IGHQIT
ID: 37839894
Perfect... That's exactly what I needed.
0
 
LVL 4

Expert Comment

by:senseifedon
ID: 37841416
Glad to hear that. :)
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question