Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the past we've used name-based virtual hosting in Apache. We recently converted websites to SSL and had to go the ip-based route. As a result, we currently have an instance that is set up as follows:

  • using port 80
  • using port 8080

Both use the same IP. Is this scenario possible using Drupal multi-site functionality? While we find that works and reads the correct "dev" database (using the dev settings), it reads theme files from the "www" site instead which is not what we want.

Is the culprit the dev's htaccess file? Apache is listening on 8080 and does use the proper DB settings, but just not the correct theme files. One other note: browsing gives an error: "The page isn't redirecting properly". Should we just purchase a new IP address for the dev website, or would this still not help?

Any advice would be appreciated. Thanks.

share|improve this question

Have you tried specifying a port with your ServerName directive for each VirtualHost stanza?

share|improve this answer
I have not as I hadn't seen that in the examples Apache provides. I suppose it couldn't hurt to try. – MattB Dec 22 '10 at 16:37

There might be a better solution if you want to pay for it.. Buy a wild card cert for *

I think the prices are around 150-200 for a year.. That will clear up your issues..

If you don't want to do that.. you can edit your htaccess to be more generic to handle ports

share|improve this answer
Thanks. I don't believe a wildcard cert is an option at the moment. So you believe it's an .htaccess issue? – MattB Dec 22 '10 at 15:46
up vote 0 down vote accepted

Turns out was only looking at all along and reading the correct DB config file from there rather than This ended up being an issue of .conf file order where was being read after due to .conf naming scheme. I renamed domain1-dev.conf to and all works great now as is being read prior to which is like a catchall.

This had nothing to do with ports or anything outside of Apache's VirtualHost settings. Here's what I used to help determine order read:

$PATH_TO_APACHE_DIR/bin/httpd -S
share|improve this answer
More info here:… – MattB Feb 23 '11 at 22:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.