dongyi7513 2010-08-01 14:36 采纳率: 100%
浏览 165
已采纳

在一台服务器上结合静态HTML,Django后端和PHP论坛?

I have a project coming up for client who is basically happy with how he manages his website. It's lots of HTML files (around 300 of them) that he insists on keeping flat HTML files so can easily edit and manage them using Dreamweaver. His site has a lot of traffic and so I'm looking into options of keeping things simple for him. He does insist on this method for the time being, I hope to win him around eventually. I'm slowly moving him off his expensive shared hosting package (he maxes it out constantly due to traffic) and getting him on a VPS so I have more control over what I can install and the resources are more flexible etc.

My issue is, there is some parts of the site that are in PHP. The small admin area he uses to do his newsletters for example sits separately away and he still requires this function. I'm thinking that since I'd have him on a server I can install what I like on, I want to start incorporating Django into the site. I'd much more prefer to do Django development for any admin type situation then trying to hack or make something with PHP. I know about the PHP frameworks out there, but they just don't appeal in this particular situation.

Due to this massive set of HTML files, is it possible to basically allow Django to carry on serving these up as they are... He can edit and upload them with Dreamweaver as he always has... But Django is 'there' for the admin side of it which he can do his newsletter? Eventually he is wanting translations for the pages and login for visitors (again which I'd like to do with Django) but for the time being I'm in this transitional period and wanting to do things step by step.

Aside note, he has a forum that is in PHP, which he also wants to keep... So I'm thinking a carefully setup combination of Nginx, FastCGI and Gunicorn so static, PHP and Django respectively can co-exist on the same server. Is this just foolish, or totally possible?

Any thoughts, guidance, tips or experience would be greatly appreciated so I take the best step forward.

  • 写回答

2条回答 默认 最新

  • dongqu9917 2010-08-01 14:55
    关注

    I see no problem with such setup, using lightweight frontend is recommended for django (or any other wsgi app) anyway. Although you should serve static html with nginx itself, not django.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 用verilog实现tanh函数和softplus函数
  • ¥15 求京东批量付款能替代天诚
  • ¥15 slaris 系统断电后,重新开机后一直自动重启
  • ¥15 51寻迹小车定点寻迹
  • ¥15 谁能帮我看看这拒稿理由啥意思啊阿啊
  • ¥15 关于vue2中methods使用call修改this指向的问题
  • ¥15 idea自动补全键位冲突
  • ¥15 请教一下写代码,代码好难
  • ¥15 iis10中如何阻止别人网站重定向到我的网站
  • ¥15 滑块验证码移动速度不一致问题