Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have apache server installed on centos, i kept some doc in www folder from where i download document with username and password .e http://staticip/folder name i want to set expiry period for this Link can it possible in apache
Define rewrite rule in .htaccess.
or
You can use Apache Module mod_expires. I don't know how to use it but google it if it can be done through this or not.
or
Alternatively
You can make a crontab which will run on your desired date.
Crontab has a command which will change the directory permission for defined user groups.
If you don't want the directory then remove it after your desired date using crontab.
When anyone will access it using static IP, it will say "Access forbidden" or if it is deleted, it shows not found like this.
And again, just saying "it not work" tells us NOTHING. If you want help fixing a problem, you have to post what the problem(s) are, where you're seeing them, when, and what you've done/tried. There's little we can help with, if you don't provide a CLEAR error, or show us what you've done/tried.
Have you tried to write a script, as was suggested to you also, to flush documents after a certain period of time?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.