我的Nginx不在docker鏡像中。我的應用程序處於docker映像中。他們都住在同一臺服務器上。如何使用Nginx連接到Docker鏡像中的應用程序?
我不希望Nginx處於Docker鏡像,因爲它對我來說配置看起來非常複雜。但我的應用程序正在碼頭集裝箱中運行。
如何配置Nginx使用我的應用程序正在運行的泊塢窗圖像?
這裏是我的Nginx的配置文件:
server {
listen 80;
server_name my.domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name www.nicolasxu.space nicolasxu.space;
# add Strict-Transport-Security to prevent man in the middle attacks
add_header Strict-Transport-Security "max-age=31536000";
ssl_certificate /root/.ssh/nicolasxu.space.cert;
ssl_certificate_key /root/nicolasxu.space.key;
[....]
}
nginx是否是服務應用程序的反向代理?或者一個經典的Web服務器? –
@FrançoisMaturel反向代理,而不是經典服務器。謝謝! –