Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Apache server that has multiple files located on it. Each file is an updated version from the previous file. Eg. release-2013-07-20 is an older file and release-2013-07-25 is the newer file.

I am looking to query the apache server and have an display of the most updated file via website link.

I am unsure how to go about accomplishing this and I am looking for some suggestions.

Thank you, Tyler

share|improve this question

closed as off-topic by Zoredache, EEAA, larsks, Ward, Ladadadada Jul 26 '13 at 7:25

  • This question does not appear to be about professional server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
So, you're looking at distributing the "latest" version of a given file? You need a front-end app (a download script). Apache can't do this on its own. –  Nathan C Jul 25 '13 at 23:17
1  
How are the files getting uploaded to the Apache server? Can you just add/update a symbolic link that points to the latest version of the file? –  Zoredache Jul 25 '13 at 23:30
4  
This question appears like it would be a better fit on webmasters.stackexchange.com. –  Zoredache Jul 25 '13 at 23:31
    
This question appears to be off-topic. –  Ward Jul 26 '13 at 3:51

1 Answer 1

If you are using mod_autoindex and an apache version of 2.0.23 or greater, you can add ?C=M to your url and it will sort by last modified date and then by file name (provided IndexOptions IgnoreClient has not been set). Provided your latest file is the last file uploaded/updated this should solve your issue.

If you have a number of files in a directory and just want to display the latest then I'd agree with Zoredache - you'd need to develop a script to present that, or symlink the latest file:

ln -s release-2013-07-25 latest-release

and provide 'latest-release' as the link to the latest file.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.