search

Home  >  Q&A  >  body text

How to deploy Thinkphp in nginx (reverse proxy) + apache environment?

I want to try this environment:

nginx反向代理,动态php处理pass给apache处理
目前只会thinkphp,所以就只能用到这三个?

当前只能显示localhost/thinkphp/index.php,无法跳转任何模块和控制器。
请问 nginx和apache分别应该如何配置?
曾经蜡笔没有小新曾经蜡笔没有小新2749 days ago955

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-16 17:03:05

    This situation is equivalent to nginx acting as a load balancer, and apache is responsible for parsing the PHP code
    First of all, the front-end files can be placed directly on nginx to speed up the response.
    PHP code is placed on the apache server.
    nginx needs to write the .php matching rules, and then nginx configures the load balancing server address and weight.
    This way you can respond.

    reply
    0
  • Cancelreply