阿里云网站部署(三):子域名解析
2017-10-10 13:54
211 查看
需求:在备案域名qwe.com的基础上,主域名www.qwe.com
输入123.qwe.com 解析到另外服务器1.2.3.2的8081端口
重要的前提是:备案成功后在阿里云做域名的泛解析,参照阿里云网站部署(一)
[root@i~]# vim/etc/nginx/conf.d/123.conf
////扩展配置子域名
server{
listen80;
server_name123.baidu.cn;
indexindex.html index.jsp index.php
proxy_set_headerHost $host:server_port;
proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_headerX-Real-IP $remote_addr;
proxy_set_headerREMOTE-HOST $remote_addr;
location/ {
proxy_passhttp://1.2.3.2:8081/;
}
}
[root@i~]#systemctl restart nginx
[root@i~]#systemctl enable nginx
验证:网页输:123.qwe.com
输入123.qwe.com 解析到另外服务器1.2.3.2的8081端口
重要的前提是:备案成功后在阿里云做域名的泛解析,参照阿里云网站部署(一)
[root@i~]# vim/etc/nginx/conf.d/123.conf
////扩展配置子域名
server{
listen80;
server_name123.baidu.cn;
indexindex.html index.jsp index.php
proxy_set_headerHost $host:server_port;
proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_headerX-Real-IP $remote_addr;
proxy_set_headerREMOTE-HOST $remote_addr;
location/ {
proxy_passhttp://1.2.3.2:8081/;
}
}
[root@i~]#systemctl restart nginx
[root@i~]#systemctl enable nginx
验证:网页输:123.qwe.com
相关文章推荐
- 阿里云网站部署(二),主域名解析及上线
- 程序包管理rpm,yum用法解析及自动化部署apache server实战,让您轻松拥有apache网站! 推荐
- 阿里云部署Java网站和微信开发调试心得技巧(上)
- 阿里云域名解析完成后仍然无法通过域名正常访问网站
- 阿里云部署Java网站和微信开发调试心得技巧(下)
- 将 java web网站部署到阿里云
- [原]阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)
- 阿里云 ECS 服务器不能访问部署好的网站
- [原]阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)
- 阿里云服务器如何解析添加二级域名+阿里云服务器或者其他网站绑定域名方法+域名解析是什么意思【申明:来源于网络】
- 阿里云 Windows Server 2012 r2 部署asp.net mvc网站 平坑之旅
- 阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)
- 阿里云部署Java网站和微信开发调试心得技巧(上)
- 阿里云ECS服务器网站部署
- 如何将J2EE开发的网站部署到阿里云上
- 【Linux 操作系统】阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)
- 在阿里云部署 Hexo 网站
- 如何将网站部署到阿里云服务器
- 【Linux 操作系统】阿里云服务器 操作实战 部署C语言开发环境(vim配置,gcc) 部署J2EE网站(jdk,tomcat)
- 网站部署之~阿里云系列汇总