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

在一台服务器上结合静态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.

图片转代码服务由CSDN问答提供 功能建议

我有一个项目即将迎来客户,他对如何管理他的网站感到非常满意。 他坚持要保留平面HTML文件,因此可以使用Dreamweaver轻松编辑和管理它们,这是很多HTML文件(大约300个)。 他的网站有很多流量,所以我正在考虑为他保持简单的选择。 他确实暂时坚持这种方法,我希望最终赢得他。 我正在慢慢地将他从他昂贵的共享主机包中移除(由于流量而不断地将其最大化)并让他使用VPS,这样我就可以更好地控制我可以安装什么,资源更灵活等等。

我的问题是,网站的某些部分是PHP格式的。 例如,他用来做他的通讯的小管理区域分开坐着他仍然需要这个功能。 我想,既然我已将他放在服务器上,我可以安装我喜欢的东西,我想开始将Django整合到网站中。 我更喜欢为任何管理类型的情况进行Django开发,然后尝试使用PHP进行破解或制作。 我知道那里的PHP框架,但它们在这种特殊情况下并没有吸引力。

由于这一大量的HTML文件,基本上可以让Django携带 他们可以像往常一样用Dreamweaver编辑和上传它们......但是Django对于它的管理方面是'那里',他可以做他的通讯? 最终他想要翻译页面并登录访问者(我还想和Django一起做)但是暂时我正处于这个过渡时期并且想要一步一步地做事。 \ n

除此之外,他还有一个PHP论坛,他也想保留...所以我在想一个Nginx,FastCGI和Gunicorn的精心设置组合,所以静态,PHP和Django分别可以 在同一台服务器上共存。 这是愚蠢的,还是完全可能的?

任何想法,指导,提示或经验都会非常感激,所以我向前迈进了一步。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

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.

    点赞 打赏 评论
  • doutang7414 2010-08-01 18:36

    I recommend using Cherokee for ease of administration. (It's very fast too) It makes complex configuration very easy, it's all done by via a really nice web interface.

    点赞 打赏 评论

相关推荐 更多相似问题