mysite.com/admin/ [给django管理面板罚款]
错误:mysite.com/blog/index.php [下载index.php而不是提供服务]
请提示nginx.config文件中的一些更改。
upstream django {
server unix:///home/ubuntu/web/www.mysite.com/uwsgi-tutorial/mysite/mysite.sock; # for a file socket
}
upstream php{
server 127.0.0.1:9000;
}
server {
listen 80;
server_name mysite.com www.mysite.com;
charset utf-8;
location ~ /blog/.+\.php$ {
fastcgi_pass 127.0.0.1:9000;
alias /var/www;
try_files $uri =404;
fastcgi_index index.php;
include fastcgi_params;
}
location / {
uwsgi_pass django;
include /home/ubuntu/web/www.mysite.com/uwsgi-tutorial/mysite/uwsgi_params; # the uwsgi_params file you installed
}
}
答案 0 :(得分:0)
请查看以下内容:How to deploy a WordPress site and Django site on the same domain?
这可能是重复的。
再次从上面的回答中,这可能就是你要找的东西:http://worldofsam.com/blog/2011/08/hosting-wordpress-on-a-nginx-uwsgi-django-site/
如果这不能解决您的问题,请告诉我。