【发布时间】:2015-11-22 08:00:56
【问题描述】:
我正在尝试将我的 nginx 配置为处理未路由的域,以便它们转到未路由域的特殊文件夹,而不是从我的主域文件夹加载未路由域。
一个例子:
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name somedomain.com;
root C:/web_root/somedomain.com;
index index.html index.htm;
}
server {
listen 80;
server_name localhost;
root C:/web_root/unrouted;
index index.html index.htm;
}
}
所以我希望所有尝试在我的服务器上设置 A 记录的访问者都转到特殊的未路由文件夹。
感谢您的帮助!
【问题讨论】:
标签: nginx configuration