I've just been through the docs looking at setting up multiple applications on the same domain but different paths, ie. www.mysite.org = static application, www.mysite.org/forum = Django app. I have set up two sample applications within a single domain to see how it works but I could do with understanding how this is achieved technically underneath on the Apache webserver. I'm wanting to set up a simulation of this method for development purposes on my test server. I'm not sure if I should be looking at virtualhosts or something different, any help appreciated. asked 14 Aug '15, 18:03 zilog8bit |
If you're using Apache as the front-end on your test server, then you should use a VirtualHost for the overall site, and Location blocks for each URL path. We're using Nginx on the front-end here - the generated web server configuration for what you've described looks like this:
The "server" block is the equivalent of an Apache VirtualHost, and the "location" blocks are the same as an Apache Location block. The static app is a straight directory mapping, while the Django app is served via proxy_pass going to the app's port (54321 in this example). Hope that helps! answered 14 Aug '15, 18:40 seanf Thanks Sean, exactly what I was looking for. Might try my first Nginx setup too, very clear example to follow in your post.
(14 Aug '15, 19:57)
zilog8bit
|