0

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 / {
   proxy_pass http://127.0.0.1:8080;
   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
</Files>
</Directory>

I added my Wordpress site using a virtualhost

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

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?

JCWong
  • 241
  • 2
  • 3

1 Answers1

0

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