4

I've got a django app that's currently available at dev.mydomain.com, and I'm about to move it to clientsdomain.com. I'm on Ubuntu so I'll run a2dissite dev.mydomain.com and then a2ensite clientsdomain.com.

My vhost files are identical except for the server name -

<VirtualHost 8.8.8.4>
    ServerName dev.mydomain.com
    #....
</virtualHost>

and

<VirtualHost 8.8.8.4>
    ServerName clientdomain.com
    #....
</virtualHost>

(obviously that's not my ip address)

I just want to know if I actually have to take down the dev vhost before I run my app from the live vhost. Can I run them both together? Are there any risks to having them up at the same time (if that's even possible).

Aidan Ewen
  • 13,049
  • 8
  • 63
  • 88
  • You can run them both, but it's better to set password on dev domain to avoid search indexing. – sneawo Feb 23 '13 at 13:05

1 Answers1

0

Each Django application will serve requests coming in to its corresponding VirtualHost. So no, in theory they can run in parallel.

However, you don't get into much detail about your setup. For example, are they backed by the same database? In this case, you do realize the problem, right?

  • @AidanEwen: Sure. If both installations are backed by the same database, then your _development_ data are _exposed_ on _production_. Similarly, your _development_ application will mess with your _production_ data. This, depending on your application of course, can be dangerous. – Charalambos Paschalides Feb 24 '13 at 16:01
  • OK, thanks @PamboPaschalides. That's the behaviour I was expecting. I don't have separate data. Same database, same data. – Aidan Ewen Feb 24 '13 at 18:05