logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Versioning
Author
NivekLR



Joined: 20 May 2018
Posts: 6
Location: France

PostPosted: Mon 04 Jun '18 20:40    Post subject: Versioning Reply with quote

Hello to all,

I would like to know if it's possible to configure apache or a module to let access to file with specific version ?

Example: I have a html file in version 1.0 with code and I want to update it but let the old version online.

Kind regards,

NivekLR
Back to top
mraddi



Joined: 27 Jun 2016
Posts: 152
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Wed 06 Jun '18 21:21    Post subject: Reply with quote

Hello,

having two versions accessible/available to the user means that you have to store both versions on the server. Smile

I have used the following idea (on linux):
create a directory for every version of your application
/var/www/html/app_v1
/var/www/html/app_v2
...
and create a symlink pointing to the version you want use as "official" version
/var/www/html/app --> /var/www/html/app_v2
By accessing http://server/app the v2 (in this case) is used whereas you still can access v1 by using http://server/app_v1 . Ensure that FollowSymlinks is enabled within your Apache-Config.
This approach also works for single files.

Or you can use mod_rewrite to rewrite requests to /app to /app_v2 and still can access v1 by using /app_v1 directly.

I would prefer the symlink-version as it is easier to understand Smile .
But the mod_rewrite-idea will work Linux as well as on Windows.

Best regards
Matthias
Back to top
NivekLR



Joined: 20 May 2018
Posts: 6
Location: France

PostPosted: Wed 13 Jun '18 14:03    Post subject: Reply with quote

Thank your for your answer Smile
Back to top


Reply to topic   Topic: Versioning View previous topic :: View next topic
Post new topic   Forum Index -> Apache