views:

183

answers:

2

Hi, I'm currently on shared hosting plan with dreamhost and have installed Django as per http://wiki.dreamhost.com/Django . However, I also have a wordpress blog that I wish to keep running in a subdirectory, i.e, site.com/blog.

Is it possible to do this. Installing Django results in a passenger_wsgi.py file in the Django root directory which redirects all the requests to django

if i try to go to my blog i get an error since obviously it's not in url.py. Is it possible to somehow serve the wordpress blog as is by configuring wsgi or django, and how can i do this?

Thanks for your time

P.S. I currently have renamed passenger_wsgi.py so that the blog shows

+3  A: 

You can disable Phusion Passenger for specific locations in the Passenger app using the following code:

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /apps/foo/public
    <Directory /apps/foo/public/wordpress>
        PassengerEnabled off
        AllowOverride all      # <-- Makes Wordpress's .htaccess file work.
    </Directory>
</VirtualHost>

For more tricks, check out the Phusion Passenger documentation

WarrenB
Oh great, seems like what i'm looking for!
petantik
Let me know how it works out for you!
WarrenB
Where would i place the override since i don't have access to the apache config file?
petantik
Check your control panel for options, or it might be hidden in your user directory, as some hosts do. If you have command line access try # find / -name 'httpd.conf' -print You may have to contact your hosting provider instead. Good luck!
WarrenB
A: 

For those who is on shared hosting you can create file .htaccess under /path/to/your/blog with one line in it:

PassengerEnabled off

That's it.

parxier