Welcome Guest | Login

migrating php site to new domain, hosted at hostingrails

I wan't to consolidate all my web hosting at hosting rails, so I have a Gallery2 website I want to move (Gallery2 is a php image gallery). I was wondering if the following would be difficult to implement:

-adding a newly-bought domain to hostingrails
-migrating 3 gigs worth of data, a mysql database, and php files to this new domain on hostingrails
-during all this, not screw up my existing domain and rails app

I've read the following tutorial:http://www.hostingrails.com/forums/deployment_troubleshooting_thread/145

And it doesn't seem like it would be too hard (besides waiting for all that data to upload).  Any other pitfalls I should be aware of? Would I be able to do it with my current account settings?

2008-06-07 04:18 PM

Hi Freeform,

You can set up Gallery2 website as a sub domain of your existing
domain. Create a sym-link from the app/public of your main application to the new application will do the trick.

cd ~/app/public
ln -s ~/Path_to_Gallery2  sub

>> migrating 3 gigs worth of data, a mysql database, and php >files to this new domain on hostingrails during all this, not >screw up my existing domain and rails app.

You can ftp the tar file of your new application to Hostingrails server.

2008-06-07 04:47 PM

What about instead if a subdomain, I want to map a new domain to /path_to_gallery2?

2008-06-07 05:55 PM


Sure. You can add the new domain as an addon domain and create the following symlink.

ln -s ~/<path/to/Gallery2 ~/public_html/<addondomaindirectory>

Also put the following rewrite rule in your .htaccess file under the gallery2 directory.
-------
RewriteEngine On
RewriteCond %{REQUEST_URI} .
RewriteRule .* - [L]

2008-06-07 07:29 PM

Okay, I was able to point the new domain to a symlink. That wasn't too hard to do, thankfully :)

I don't have an .htaccess file though.  Would I be able to just copy those three lines into a blank .htaccess file?  And what if I put gallery2 in subdirectory like ~/<newdomainname>/gallery2? Would I still put the file in gallery2, or put it in ~/<newdomainname>?

2008-06-08 10:05 AM

>>I don't have an .htaccess file though.  Would I be able to >>just copy those three lines into a blank .htaccess file?

Yes..that will do.

>>And what if I put gallery2 in subdirectory like >>~/<newdomainname>/gallery2? Would I still put the file in >>gallery2, or put it in ~/<newdomainname>?

Put the file in gallery2 sub-dir.

2008-06-08 10:41 AM

Regards,
Rahul
Hmm, I copied over some small php files to test if the symlink and domain name worked properly, and I get the following error navigating to the domain:

"Application error
Rails application failed to start properly"

I don't plan on hosting a rails app in this directory, and I don't want it to mess up the rails app on my main site.  Any way to change its mind?  Does it not recognize index.php by default?

2008-06-08 10:58 AM

I've put the rewrite rules in your .htaccess file under your addon domain directory. Your site is working fine now.

2008-06-08 12:53 PM

Thanks! Now I'm on my way to transfer Gallery2.  Wish me luck.

2008-06-08 01:11 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.