[英]Is it possible to run Django tests on Apache instead of the development server?
[英]Is it possible to run Django and Wordpress on same server with selective urls with apache?
是否可以在同一服务器上运行Django和Wordpress? 我看过其他示例,如果/由django和/ blog /由wordpress处理,则可能,但是如何处理呢?
/api/ -- eg. api/v1/user/show
/signin/,
/create/,
/dashboard/ -- eg. dashboard/reports/
由Django和
/
/about/
/security/
/contact/
/tos/
/privacy/
/faq/
/contact/
等与WordPress的?
是的,据我所知,如果您使用的是nginx和uwsgi,则可以像这样配置nginx:
upstream django {
server unix:/path/to/your/django/project/your.sock; # for a file socket
}
server {
location /about{
proxy_pass http://127.0.0.1:8080;# where your wordpress run
}
location /secirity{
proxy_pass http://127.0.0.1:8080;# where your wordpress run
}
# other url needed to handle by wordpress
# left are all handled by django
location / {
uwsgi_pass django;
include /path/to/your/django/project/uwsgi_params; # the uwsgi_params file you installed
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.