Tag Archive: BlueHost

No SVN on BlueHost


SVN stopped working on BlueHost last week. After a bit of digging, I discovered that the configuration of OpenSSH had changed, limiting the $PATH for non-interactive shells to the default of /usr/bin:/bin. You can’t change it in ~/.bashrc; you can’t change it in ~/.ssh/rc.

So, I start talking to tech support. At first, they tried to be helpful, and apologized for the inconvenience. But today, I got this message:

“Openssh was upgraded for security reasons. Unfortunately the upgrade changed functionality and now some programs such as subversion and git no longer work the way they did previously.

“It appears that the old behavior may have been flawed in the first place and shouldn’t have worked. We are looking into how to restore previous functionality without any negative security impact, but we have a desire to keep our accounts and servers from being compromised and therefor any decisions on changing functionality will be made with that in mind, but for the time being we are not promising that the original functionality will be restored due to security reasons.”

Well, that’s that, then. Goodbye, BlueHost. You are no longer an adequate web host. I think I’ll give 1&1 another shot before I finally give in and go with Linode.

Update 2010-04-22: See Franklin Strube’s post below for a possible workaround. I haven’t tested his solution (I’ve already moved off of BlueHost), but it seems sound. Thank you, Mr. Strube.

Moving the Document Root with mod_rewrite

If you host a website with BlueHost, you don’t get to choose the directory for your domain’s document root. Your primary domain (i.e., the one you signed up with) will have a document root of ~/public_html/, and any additional domains will be sub-directories of that (e.g., ~/public_html/xplus3/).

That doesn’t give you much flexibility if you want to do something crazy like keep your sites organized. I would much rather see my primary domain’s document root at ~/public_html/xplus3.net/www, so I can keep subdomains in directories that aren’t also subdirectories of the primary domain’s document root, not to mention keeping entirely different domains out of the directory tree for the primary domain.

My problem seems to be common enough that BlueHost gives you some basic instructions for using mod_rewrite to achieve essentially the same thing. Their formula is slightly lacking, though.
Continue reading

SVN on BlueHost

UPDATE 2010-04-15: Due to recent changes at BlueHost, the instructions below will no longer work. You’ll get SVN installed, but you won’t be able to check out your repositories. See No SVN on BlueHost for the details.

I’m in the process of migrating most of my sites from DreamHost to BlueHost. Putting the reasons for the move aside (<cough>uptime</cough>), DreamHost has one major advantage over BlueHost: easy-to-setup SVN. On BlueHost, SVN isn’t installed, so it took a bit of research to figure out how to do it. I found installation instructions in a few places, but (1) they were all for version 1.4.6 (1.6.4 is the current version) and (2) they didn’t quite work for me. So, here’s how I went about it:

cd ~/src
wget http://subversion.tigris.org/downloads/subversion-1.6.4.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.4.tar.gz
tar xzf subversion-1.6.4.tar.gz
tar xzf subversion-deps-1.6.4.tar.gz
cd subversion-1.6.4
./configure --prefix=$HOME
make install
cd ~
mkdir svn
cd svn
svnadmin create MyRepository

Pretty simple, overall. Subversion handles all of the dependencies automagically. The only non-standard bit there is the --prefix=$HOME to install it in my home directory (where I have write permission).

Now I can check out my repository with:

svn co svn+ssh://[email protected]/home/myUserName/svn/MyRepository

Notice the use of the svn+ssh protocol. BlueHost doesn’t have mod_svn enabled for Apache, so you can’t connect using HTTP.

Thanks to the Subversion / TortoiseSVN SSH HowTo and these instructions for remembering SSH passwords, I was able to save a session in PuTTY and use those settings to connect using a public key, so I don’t have to enter a password 400 times to check out the repository.