Unless all your apps are without AppWebs, then besides setting up then environment as linked to by @CMarius it's important to have a web application with no hostname assigned to it to serve as the host for the AppWebs. This web application doesn't need to be the one used for any of your real site collections, but as always to be supported it need a site collection at the root (this can be with any (even no) template).

Per, I thought an AppWeb is instantiated under the HostWeb (in the same Web Application). But you say that AppWebs could be hosted in a different Web Application. Have I taken your point correctly?
–
Alexey GrachevMar 7 '13 at 20:41