我在单个 IP 地址上运行 Proxmox 服务器,它将根据请求的主机向容器发送 HTTP 请求。
我在 Proxmox 端使用 nginx 来监听 HTTP 请求,我proxy_pass
在不同server
块中使用指令根据server_name
.
我的容器在 Ubuntu 上运行,同时也在运行一个 nginx 实例。
我在完全静态的特定网站上缓存时遇到问题:在文件更新后,nginx 继续为我提供陈旧的内容,直到我:
proxy_cache off
为此服务器设置并重新加载配置这是我的配置的详细信息:
在服务器上(proxmox):
/etc/nginx/nginx.conf:
user www-data;
worker_processes 8;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
#tcp_nopush on;
tcp_nodelay on;
#keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off; …
Run Code Online (Sandbox Code Playgroud)