I have nginx listening to port 80 for my primary site foo.com. It proxys to port 8080 which is where the Django app lives

server {
  listen 80;
  server_name www.foo.com foo.com;
  access_log /home/jeffrey/www/ddt/logs/nginx_access.log;
  error_log /home/jeffrey/www/ddt/logs/nginx_error.log;
  location / {
   include     /etc/nginx/proxy.conf;
  location  /media/ {
   root /home/jeffrey/www/ddt/;
  location  /static/ {
   root /home/jeffrey/www/ddt/;
  location  /public/ {
   root /home/jeffrey/www/ddt/;

I'd like to have a wordpress blog run on the same server. Apache is listening to port 8080 with this http.conf file

NameVirtualHost *:8080
WSGIScriptAlias / /home/jeffrey/www/ddt/apache/ddt.wsgi
WSGIPythonPath /home/jeffrey/www/ddt

<Directory /home/jeffrey/www/ddt/apache/>
<Files ddt.wsgi>
Order deny,allow
Allow from all

I added my Wordpress site using a virtualhost

<VirtualHost *:8080>
ServerName www.bar.com
ServerAlias bar.com
DocumentRoot /home/jeffrey/www/jeffrey_wp

When I go to bar.com I still see my django app. Is it possible for these two sites to run on the same server?

  • Why do you do this so complicated? You can serve the Django app directly with nginx. – Christopher Perrin Oct 7 '12 at 17:44

You will see it if you navigate to bar.com:8080.

IMHO you should use Nginx as a reverse proxy for both sites foo.com and bar.com. Use Apache to serve the Django site and the Wordpress site from ports 8080 and 8090

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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