随着需要的网站增多,域名也多了起来。刚开始一个域名开一台服务器,但现在这种情况明显有点不合实际了,毕竟服务器成本不低。那么,一台服务器上如何开多个网站?答案是nginx!
域名解析自不必去说,conf的设置改动一下就可以啰。比如都在监听80端口,以server_name和root来引导进不同的网站(如下文所示),是不是很轻松写意?!
1 | server { |
This page is synchronized from the post: ‘一台服务器开多个网站 / 网络研习社#60’
随着需要的网站增多,域名也多了起来。刚开始一个域名开一台服务器,但现在这种情况明显有点不合实际了,毕竟服务器成本不低。那么,一台服务器上如何开多个网站?答案是nginx!
域名解析自不必去说,conf的设置改动一下就可以啰。比如都在监听80端口,以server_name和root来引导进不同的网站(如下文所示),是不是很轻松写意?!
1 | server { |
This page is synchronized from the post: ‘一台服务器开多个网站 / 网络研习社#60’
Update your browser to view this website correctly. Update my browser now