I have been developing a new site for a client using the Domain Access module, where I used a different domain than what the production domain will be (since that site is live with the old site on it) and I can't use just IP address with Domain Access for development.
These are the steps I believe I will do for the move:
1. Move the site to what will be the production server for the new site to test on that server. At that time only access will be by IP address.
2. Point the production domain to the new IP address. Prior to that I will change my primary domain and sub domains in Domain Access settings to reflect the production domain.
Questions:
A. In step #1, will the site stop working while I have IP address access only?
B. Do you see any problems with step #2?
C. What is recommendation for running production and development versions with Domain Access? Just use different domains, but all else the same?
Thanks,
Rick Hood
NOTE: just FYI I am not using sub domains to begin with, but will in the future so wanted to have this site set up to go that way and experiment with sub domains in development.
Comments
Comment #1
agentrickardSteps one and two should not be a problem, however, you will not be able to perform step #2 through the user interface. You are probably safest by adding the following code to settings.php on the production site:
Put this at the bottom of settings.php:
This should allow you to access the main site before you have reset the domain values. It should allow you to you the UI for updating those values. Simply remove this line from settings.php when done. (Optionally, you could leave code like that in your test site.)
If that doesn't work, you will have to edit the values directly in the database and clear your cache.
The preferred way to handle this problem is in 6.x.2.0, using Domain Alias to manage separate instances of the 'same' site. Starting a backport of that module to D5 would be very helpful.
Comment #2
rick hood commentedThanks Ken! This module is fantastic. Thank you so much for your work on it!
I wish I was good enough to do this "Starting a back port of that module [Domain Alias] to D5 would be very helpful." I have not done any module development at all, but I will have a look at it at least.
Comment #3
rick hood commentedJust reporting for others that
worked great except you also have to comment out:
in settings.php to get login to work.
Comment #4
agentrickardYes, that's true. Or reset $cookie_domain to the IP. Sorry for the oversight.
Comment #5
rick hood commentedContinuing saga:
I am now in the process of moving this site to my client's production server (their own in house server). To test it there I though I would run the whole site in a folder first, before putting it in the root of the server (because their old site is there live now).
So, my settings.php has this in it for production:
$base_url = 'http://123.123.23.24/drupaldevel';
$cookie_domain = '123.123.23.24';
$conf['domain_root'] = '123.123.23.24'; (last line of settings PHP)
I am accessing the site via: http://123.123.23.24/drupaldevel/
I can login OK and the site works OK EXCEPT I cannot access any of the admin pages. Any admin page I try to go to just never loads - browser says loading but it never loads.
Now, this server is different in many ways from the development server. One difference is that devel server was MySQL 4.1 and production server is 5.x. Also production server does not have mysqli support, so I have to change connection from:
$db_url = 'mysqli://username:password@localhost/databasename';
to:
$db_url = 'mysql://username:password@localhost/databasename';
Any advice appreciated. Thanks.
Comment #6
rick hood commentedChanging to active - and sorry as this is likely nothing directly related to domain access.
Comment #7
agentrickardYou cannot set $base_url manually when using Domain Access. Doing so will cause a variety of errors.
Comment #8
rick hood commentedOK I will comment out $base_url. Then to use the site in a folder can I do this?
$conf['domain_root'] = '123.123.23.24/folder';(I will try it - the production server is actually down right now so I can't).Strange: it is only the /admin/* pages that are not loading. Wondering what is different about those than all other pages.
---update---
This didn't work:
$conf['domain_root'] = '123.123.23.24/folder';and also doesn't work if I don't use $base_url.I might try to see if I can disable Domain Access modules via phpMyAdmin (not sure if possible) to see if that helps me able to get to admin pages to help see if Domain Access is anything to do with this problem (as opposed to MySQL differences between devel and production discussed above).
Comment #9
agentrickardDon't set a folder as part of the domain_root, either. DA will handle that for you.
Just use
$conf['domain_root'] = '123.123.23.24';Comment #10
rick hood commentedI just wanted to update that the problem I encountered when moving to the production server had something to do with Update Status module. When I disabled it (via phpMyAdmin) I could then get to my production sites admin pages. Perhaps Update Status was hanging trying to phone home or whatever it does.
Thank you so much for your help.
DA is a fantastic module with fantastic documentation and help!
Comment #11
agentrickardUpdate Status can (I think) have issues if you are behind a firewall.
See #172708: updating from an intranet
And #7881: Add support to drupal_http_request() for proxy servers (http not https)