LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-08-2013, 04:30 AM   #1
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Rep: Reputation: 1
Apache


Hi

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


Amar
 
Old 03-08-2013, 07:39 AM   #2
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
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.
 
Old 03-19-2013, 02:06 AM   #3
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi

i google but not get clear how to use Define rewrite rule in .htaccess and Apache Module mod_expires.
 
Old 03-19-2013, 10:30 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,949

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by amartlk View Post
hi
i google but not get clear how to use Define rewrite rule in .htaccess and Apache Module mod_expires.
I doubt that, since the docs on the Apache site include EXAMPLES, and clear explanations.
http://httpd.apache.org/docs/2.2/mod/mod_expires.html

Did you even try to make any of these solutions work?
 
Old 03-20-2013, 01:15 AM   #5
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
Hi

I tried this but it not work for me
 
Old 03-20-2013, 09:38 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,949

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by amartlk View Post
Hi
I tried this but it not work for me
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?

Last edited by TB0ne; 03-20-2013 at 09:49 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache close wait error :Apache stop responding,Server get hangs jsaravana87 Linux - Server 1 06-19-2012 12:49 PM
setting up apache from scratch on a linux machine, apache failed message upon bootup dramous43 Linux - Enterprise 2 01-26-2010 08:53 AM
Apache Webserver on Slackware - Failed to Start Apache - 'no listening sockets .." CCTVGuru Linux - Server 4 10-11-2009 02:14 AM
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 01:41 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 11:53 AM


All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration