Nginx- How can I serve my static content with https that has a proxy in location block?

前端 未结 1 511
臣服心动
臣服心动 2020-11-28 16:27

My server listen 443 port and redirects the requests to another port in the server. Also my server listen 80 port and displays a static content the user when they browse htt

相关标签:
1条回答
  • 2020-11-28 16:57

    You can invoke a named location as the default action of your try_files statement.

    For example:

    location / {
        try_files $uri $uri/ @proxy;
    }
    location @proxy {
        proxy_pass http://backend;
    }
    

    See this document for details.

    0 讨论(0)
提交回复
热议问题