Home  >  Q&A  >  body text

Staticization - is this configuration possible with nginx?

Now our nginx supports the response of the pan-domain name, *.domain.com, and we have made the homepage static for the sub-sites under the pan-domain name:
For example: sc.domain.com The static homepage file is sc_index.html
Can nginx be configured to implement a request for sc.domain.com/index.html when the response is thrown sc_index.html

世界只因有你世界只因有你2712 days ago568

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 17:28:17

    I just got this configuration recently, just add the following configuration:

    location =/ {
    rewrite (.*) /static_index.html last;
    }

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 17:28:17

    rewrite

    reply
    0
  • Cancelreply