You are here
Bill Carney - Thu, 2011/05/19 - 17:04
My background is on Windows, but I want to learn Drupal on Linux, so I downloaded and played with the TKL Drupal VM.
On the Windows side if I want to duplicate a "template" Drupal configuration I have set up, all I have to do is:
Dump the database to a backup file.
Create new database and restore the template backup to it.
Duplicate my template website (ie D:\Sites\Template to D:\Sites\NewDomain.com).
Load up IIS and create a new site pointing to NewDomain.com to D:\Sites\NewDomain.com.
Load D:\Sites\NewDomain.com\sites\default\settings.php and edit the $db_url line.
Easy peasy.
What is the process to do the same in TKL Drupal VM?
To test things out, I loaded up and configured the default Drupal site with a generic "First Test Site" name.
Then I downloaded the contents of /share/drupal6 to a temp folder my desktop
and /etc/drupal/6/sites to the temp folder my desktop
I created /var/www/domain1.com and copied the contents of my temp folder into it
In Webmin, Servers, Apache Web server, I created a new virtual host. I selected /var/www/domain1.com as the document root, domain1.com as the server name, and Copy directives from changed to Automatic:80 /usr/share/drupal6/
Then in the virtual server I selected Domain1.com and 'Networking and Addresses" and added www.domain1.com as an Alternate virtual server name.
I applied the changes, and also Stopped and Started Apache.
Loaded up PHPMyAdmin, Exported the drupal6 database.
Created 'Domain1' database
Imported drupal6 backup into it.
Edited /var/www/domain1.com/sites/default/settings.php and dbconfig.php to use the root acct/password to access the domain1 database
I'm able to view the default page on Domain1.com, but after attempting to log in it tries to go to http://www.domain1.com/node?destination=node and I get a Not Found error. If I go to the IP address, the default site bombs out with the same error. Basically, Drupal stops working.
I suspect it's because I haven't copied some files to a proper location, but I don't know where to start. Any ideas?
Forum:
Tags:
I'd check file permissions
I have no idea really as I have very little experience with Drupal, but on reading your post, my first thought is to make sure file permissions are ok.
By downloading files to Win and then reuploading them, it will strip the Linux file permissions (I assume that you reuploaded as root - therefore the 'new' site will be owned by root and the webserver won't have access to it). So to fix this, change the owner to www-data (the default webserver user). You can do this through the Webmin File Manager if you wish (click on the webroot folder in the right pane, then click Info, change owner and make sure you allow it to propergate to all files and subfolders). Or from the commandline (assuming webroot of /var/www/domain1.com):
You may also need to tweak the ownership of the db although I'm not too sure about that (or how you go about it if you do).
Add new comment