search

Home  >  Q&A  >  body text

Can nginx deploy static pages for interception?

Now there is such a demand. I have deployed several static HTML on nginx, but I want to intercept when accessing these static pages. After intercepting, I will judge something and then display the page (for example Inappropriate examples are: judge the requested IP and decide whether to go to this page). The current situation is quite strange. I cannot put these pages in a certain web program and intercept them through this program. I can only statically deploy the pages. Is there any way to solve this problem?

某草草某草草2792 days ago752

reply all(2)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-16 17:18:24

    Lua scripts can be embedded in nginx configuration files

    reply
    0
  • 怪我咯

    怪我咯2017-05-16 17:18:24

    What does "judge something and then display the page" mean? What content do you want in nginx里动态修改html?

    Added:

    Well, it can indeed be done (although I am not an expert), but I have seen others do it (nginx里可以写if), so it is completely OK to "judge" some things. Here is a link to someone's explanation: nginx-check

    reply
    0
  • Cancelreply