Forum OpenACS Development: Unusable Development server... Solutions?

Months ago we set up a development server.
And after much time and expense, it continues
to be unusable....

Our production server hosts ~40,000 users and we
have treaded lightly in making only NECESSARY
changes on the "live" server.

We dislike doing development here and it has
discouraged us from making many changes.

We make a mirror copy of our production site
"mysite.com" on the dev server and change the
settings so the domain is "mysite.ws" yet we
canNOT log onto the dev site ".ws". Many
tricks have been tried by our OpenACS
knowledgable developers without success.

We thought it was because our code had some
custom change that in some way have hard coding
to the prod domain: "mysite.com", yet we find this
thread that indicates that this is a problem
for all ACS users:

SUBJECT:
Host-node map, acs-subsite, cookies, and registrations.

https://openacs.org/forums/message-view?message%5fid=187226

from the thread in part:
In June 2006 Ryan Gallimore posted:
----
I've found that when I setup a second domain in
addition to domain1.com, say domain2.com, and map
it to a subsite, it's pretty much unusable...

The subsites are such a great mechanism, what
have admins done in the past when they want to
host separate domains pointing to different
permissioned subsites?
---
and In November Ryan wrote in reply to Dave Bauer:

---
Adding a redirect for /notifications worked fine.
But /register failed:
http://subsite.com/register/
Always redirects to:
http://mainsite.com/register/
Which makes it impossible to template subsite.com,
or operate it as a distinct area.
Any ideas?
---

AND there has been no reply or solution that
would solve this?

Does anyone in the openacs community use a
dev server / production server with subsites?

If so, can you offer insight so we can use
a Dev server for development?

Are there any plans to make CORE changes
so that this is solved?

Thanks

-Bob O

Collapse
Posted by Torben Brosten on
Are you sure you are wanting to have a development server as a subsite of a production server?

A subsite of a production server is still part of a production server, sharing the same db, procs etc. Something breaks in the subsite, it breaks for the production system.

Are you wanting a separate development server on the same ip as the production server?

There are many ways to handle this.

The simplest configuration shares the same domain name, just use a different port, and assign different "subdomain.domains" to both, so there is no confusion with cookies, for example: mysite.com:80 for production and www.mysite.com:8000 for development.

One can also use a reverse proxy to serve multiple domains from the same ip, with each domain serving a separate openacs instance.

Collapse
Posted by Malte Sussdorff on
Bob was not talking about taking a subsite on the production server. The idea is to take the production site dump file, copy it over to the developement server (different computer), install it, reset all host nodes, reset all parameters (notably SystemURL and CookieDomain) and reset every other instance of mysite.com on mysite.ws.

What we found though is that the new server does not set the cookie at all. I tried to set a cookie manually using the ad_set_cookie procedure, to no avail.

Note, this behaviour does not show up at (at least to my experience now coming to think of it), if you are using a different subdomain specific for development. This might be worth a try, to say:

develop.mysite.com is redirected via DNS to the development server's IP address and we make sure that develop.mysite.com cannot be a subdomain for mysite.com (on the production server).

Collapse
Posted by Torben Brosten on
In another case, if you are making a copy of the production server for testing/development and have disabled/rerouted email so users don't get notifications.. then, it is probably easiest to change all the production-server.coms to developer-server.coms in the db's dump file, before loading into the developer site.. (in addition to changes in the config.tcl file).
Collapse
Posted by Torben Brosten on
Hi Malte,

Sorry, I still think I'm missing something. To clarify, you are wanting to create a developer site (mysite.ws) from a production site (mysite.com). The new system is not creating any cookies (maybe because browsers see the mysite.ws trying to create cookies for mysite.com?).

One can move openacs instances from one domain to another, by copying the openacs files and a db dump file over to the new server.

Check for any hard-wired urls in the files. I would use:

grep -R "mysite.com" /var/lib/aolserver/mysite.ws

repeat the same with the ip number.. just in case.

and also replace all instances of mysite.com with mysite.ws (and the mysite.com's ip number with the mysite.ws' one) in the db dump file *before* uploading to the new server.

This way you don't have to deal with finding and changing all the cases in the host node map, parameters and other data.

Regarding no cookies.. have you tried using telnet to see how mysite.ws is trying to set the cookie?

Collapse
Posted by Malte Sussdorff on
Torben's suggestion with doing the perl statement to modify the dumpfile did the trick this time.

I wrote my experience up in a quick guide at http://www.cognovis.de/developer/en/development_server with a small script to update the development server. Hope this is useable for anyone else.

Additionally I just hope that it works this time, as I tried this trick before and did not succeed back then.