Nginx作为HTTPS反向代理的多个子域名?

我的Linux机器上有一个IP地址,并希望以这种forms提供HTTPS网站:

https://landing.example.com https://site-01.example.com/index.html https://site-01.example.com/files/index.html https://site-01.example.com/store/index.html https://site-02.example.com/index.html https://site-02.example.com/files/index.html https://site-02.example.com/store/index.html 

这些网站中的每一个都是同一主机上的Docker容器,所以我的想法是设置一个Nginx反向代理Docker容器。

有很多关于NginX作为反向代理的howto,但是我想要做的不同于教科书的例子,因为我有HTTPS,多个子域和多个URL。

问题

有谁知道如何处理这种types的设置,或者可以告诉我,我应该search的技术关键词是什么?

在这一点上,我不知道从哪里开始,所以任何帮助将不胜感激。

您需要添加Alogging到您的DNSpipe理器,将您的所有子域redirect到主机的IP地址。 然后在你的NGINXconfiguration中,你可以做这样的事情。

 server { listen 80; server_name landing.example.com; location /static { alias /home/example-dir/staticfiles; } access_log /home/example-dir/nginx-access.log; error_log /home/example-dir/nginx-error.log info; } server { listen 80; server_name site-01.example.com; location /static { alias /home/example-dir2/staticfiles; } }