In my company we have a server with public IP and Wordpres installed on it. Wordpress url is like www.companyblog.org and works fine.
However, I need to deploy on the same server Django application at url: www.companyblog.org/testproject.
I'm using Ubuntu 12.04 LTS and Apache 2.2.
Here's my virtual host configuration for my Django application:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName companyblog.org
ServerAlias www.companyblog.org
DocumentRoot /var/www/wordpress/public_html
WSGIScriptAlias /testproject /home/mazix/djangoprojects/testproject/testproject/wsgi.py
<Directory /var/www/wordpress/public_html>
Order allow,deny
allow from all
</Directory>
<Directory /home/mazix/djangoprojects/testproject>
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/error.log
LogLevel warn
CustomLog /var/log/access.log combined
</VirtualHost>
And problems I have ... :
- When Wordpress site is enabled at
www.companyblog.organd Django app site is enabled atwww.companyblog.org/testproject, I'm getting the famous Wordpress error:This is somewhat embarrassing, isn’t it? It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help. - When Wordpress site is disabled at
www.companyblog.organd Django app site is enabled atwww.companyblog.org/testprojectI can access the test Django website, so it works fine.
I haven't changed the default Django application project. I didn't change the urls.py, wsgi.py, etc. - none of them was changed. I've only added WSGIPythonPath /home/mazix/djangoprojects/testproject to /etc/apache2/apache2.conf file.