0

I'm working with an implementation of YAWS and would like to have an easy way for developers to switch between using the docroot specified in yaws.conf and a custom location which contains a development build.

Eg. say docroot is set to serve /TEST/html

I want a developer to be able to switch docroot to /TEST/dev/html while YAWS is still running (and only have that change effect that one user).

Any suggestions on how I could accomplish this would be appreciated.

1 Answers1

2

There are a few ways to accomplish this:

  1. Set up a separate server instance in your yaws.conf file with a different docroot.
  2. Run an entirely separate Yaws instance for testing purposes.
  3. Use an appmod registered on "/" to examine all incoming requests and redirect those specific to your developers to a different directory area.
  4. Use arg rewriting to redirect developer requests to a different server instance (follow that link to section 7 of the Yaws PDF documentation).

Of these, I'd recommend 1 or 2, since 3 and 4 rely on "special" URLs that might cause problems if used by a non-developer (in general, mixing testing and production on the same server endpoint can be problematic).

Steve Vinoski
  • 19,847
  • 3
  • 31
  • 46
  • Thank you very much for the swift reply and laying out all the alternatives. I'll go with a combination of 1 and 3, I agree that mixing testing and production would be problematic, but I would also like developers to be able to be able to toggle between a release build and development build, which they can do with a special URL. I will setup a seperate server instance for developers, and then allow them to use a special URL query to toggle between development and release builds. – Benjamin Weber Jun 09 '14 at 13:09
  • I could accomplish everything I've asked for by only doing #1, but I like the idea of using #3 or #4 as well because they allow a developer to switch to development code without having to logout every time or keep two side by side windows open. Again, thank you for your help! – Benjamin Weber Jun 09 '14 at 13:32