george h's picture

I'm using Turnkey Wordpress and trying to set up a name based server ( so that website urls are names instead of ip addresses. This is a continuation of a previous thread, (

The basic idea is to create a new config file, /etc/apache2/sites-available/my-site.conf, for a new wordpress site you will put in a new folder, www/var/mysite_html. The my-site.conf file is basiclly a modification of the wordpress.conf file found in the same directory.

In the previous thread cited above, this method is well discribed. But the thread wasn't finished. It ended with an unanswered question from Jeremy Davis who was offering support. The question was, did it work? Well for me it didn't.

This seems like a simple thing that should readily work. And their are other ways to do it as well. But Turnkey Wordpess almost seems like it's hard wired to use only the ip address. Unfortunately this is not very functional when it comes to developing wordpress sites.

I think I must be missing something. But even though this issue is touched upon in a number of threads, I could get no clue. I would appreciate any help offered.

Oh, by the way. Turnkey is great. Had the site up and runing in VirtualBox in 15 minutes. Except the ip address made salad of the sites links. :)

george h's picture

The problem I had was solved when I updated the /etc/hosts file with the the Turnkey appliance ip and the my-site ServerName. I added something like this to the hosts file,  my-site. I actually did this in Turnkey Lamp, not Wordpress, but it should work with either.

I had already done this before, but here's the comedic rub. Don't do it in the hosts file found in the Debain running in your Turnkey appliance. Do it in your operating system's hosts file. You know, the one your browsers can see. :)

Here's a few more Turnkey links on setting up name-based virtual hosts for those that may be looking. But don't forget the must do /etc/hosts update.


Jeremy Davis's picture

Apologies on my slow response.

Thanks tons for your feedback and thanks too for posting back with your solution. It sounds like your initial setup was mostly right, just that you needed a way to find the machine via domain name (which a hosts entry provides), but had inadvertently done it the wrong way...

Add new comment