How to deploy WordPress and Django in the same domain?

I am a complete newbie when it comes to sysadmin / deployment. Here is what I hope to do:

  • The .com domain will be a regular WordPress site.
  • Have either domain.com/app or app.domain.com, like Django webapp.
  • Hosting on Linode.
  • Fast and easy Django web server code updates.

From what I can tell, gunicorn is an elegant way to serve Django webapp, while WordPress works most naturally with Apache. Meanwhile, nginx is recommended as a proxy in front of killer weapons, and also appears to be used to improve WordPress site performance.

So, I think: use nginx as a proxy server that routes all incoming web requests to either gunicorn (for Django wepapp) or Apache (for the WordPress site). The Linode host will run nginx, gunicorn, and Apache at the same time.

Meanwhile, for Django webapp updates, I can just upgrade to the latest version of the code via github.

Does all this make sense? Do I even understand things conceptually right? Or bark the wrong tree? (For example, can / I use one Apache server to route requests to WordPress or a URL-based Django application?) What problems and issues should I consider when I examine how this works well and smoothly?

UPDATE : I did all this with (1) using Heroku to host my Django application, (2) using a CNAME record to map app.domain.com to Heroku -hosted Django application and (3) leave (for now) the site WordPress on its existing domain.com host. Fortunately, after gaining a lot of respect for what the system administrators and db administrators are doing, when I examined all this, now I can return to coding!

+6
source share
1 answer

@ Ghopper21

+1 for your question.

Now, it’s really interesting to know how this is possible in real time. I checked with some of my female friends, and I found a terrific answer, here are some suggestions with a link that I received after brainstorming with them.

First of all, check out this link to deploy and run WP along with Django on Nginx + uWSGI ...

These two streams of support forums from Webfaction.com give you more information on how they recommend it to their client ...

Deploying Django and Wordpress in the Same Domain

wordpress + django on the same account - recommended or not?

Hi, I have some support. most , which explains how to achieve it on the APACHE server ...

How to run Django and PHP on the same Apache server?

And last but not least: the one where the geek, like us, integrated WP with Django ... WordPress and Django integration

+7
source

Source: https://habr.com/ru/post/925384/


All Articles