衡阳市网站建设,科技百科,自建博客wordpress,深圳牌匾制作Apache虚拟主机的配置和泛域名解析实现代码更新时间#xff1a;2012年03月11日 00:28:19 作者#xff1a;Apache虚拟主机的配置和泛域名解析实现代码#xff0c;需要的朋友可以参考下虚拟主机的配置基于IP地址的虚拟主机配置Listen 80DocumentRoot /www/jb51ServerName ww…Apache虚拟主机的配置和泛域名解析实现代码更新时间2012年03月11日 00:28:19 作者Apache虚拟主机的配置和泛域名解析实现代码需要的朋友可以参考下虚拟主机的配置基于IP地址的虚拟主机配置Listen 80DocumentRoot /www/jb51ServerName www.jb51.netDocumentRoot /www/jb512ServerName www.jb512.org基于IP和多端口的虚拟主机配置Listen 172.20.30.40:80Listen 172.20.30.40:8080Listen 172.20.30.50:80Listen 172.20.30.50:8080DocumentRoot /www/jb51-80ServerName www.jb51.netDocumentRoot /www/jb51-8080ServerName www.jb51.netDocumentRoot /www/example2-80ServerName www.jb51.orgDocumentRoot /www/example2-8080ServerName www.example2.org单个IP地址的服务器上基于域名的虚拟主机配置# Ensure that Apache listens on port 80Listen 80# Listen for virtual host requests on all IP addressesNameVirtualHost *:80DocumentRoot /www/jb51ServerName www.jb51.netServerAlias jb51.net. *.jb51.net# Other directives hereDocumentRoot /www/example2ServerName www.example2.org# Other directives here在多个IP地址的服务器上配置基于域名的虚拟主机Listen 80# This is the “main” server running on 172.20.30.40ServerName server.domain.comDocumentRoot /www/mainserver# This is the other addressNameVirtualHost 172.20.30.50DocumentRoot /www/jb51ServerName www.jb51.net# Other directives here …DocumentRoot /www/example2ServerName www.example2.org# Other directives here …在不同的端口上运行不同的站点基于多端口的服务器上配置基于域名的虚拟主机。Listen 80Listen 8080NameVirtualHost 172.20.30.40:80NameVirtualHost 172.20.30.40:8080ServerName www.jb51.netDocumentRoot /www/domain-80ServerName www.jb51.netDocumentRoot /www/domain-8080ServerName www.example2.orgDocumentRoot /www/otherdomain-80ServerName www.example2.orgDocumentRoot /www/otherdomain-8080基于域名和基于IP的混合虚拟主机的配置:Listen 80NameVirtualHost 172.20.30.40DocumentRoot /www/jb51ServerName www.jb51.netDocumentRoot /www/example2ServerName www.example2.orgDocumentRoot /www/example3ServerName www.example3.net网站泛域名解析添加一个虚拟主机配置(如下)DocumentRoot d:/web/jb51 # 网站根目录的绝对路径ServerName www.jb51.net # 网站域名ServerAlias *.jb51.net # 网站泛域名APACHE泛域名配置参考NameVirtualHost 192.168.0.110DocumentRoot E:/InterRoot/workplace/ServerName www.workplace.comAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:/InterRoot/busymouse_test/ServerName www.test.comAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:/InterRoot/iptv_for_browser/authServerName auth.billing.comServerAlias auth.billing.com *.auth.billing.com#泛域名解析ErrorLog E:/InterRoot/iptv_for_browser/serverlog/apache.logAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:/InterRoot/iptv_for_browser/apiServerName voiz.billing.comErrorLog E:/InterRoot/iptv_for_browser/serverlog/apache.logAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:/InterRoot/iptv_for_browser/userServerName user.billing.comErrorLog E:/InterRoot/iptv_for_browser/serverlog/apache.logAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:/InterRoot/iptv_for_browser/centerServerName center.billing.comErrorLog E:/InterRoot/iptv_for_browser/serverlog/apache.logAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:/InterRoot/iptv_for_browser/imgServerName img.billing.comErrorLog E:/InterRoot/iptv_for_browser/serverlog/apache.logAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:/InterRoot/iptv_for_browser/logServerName log.billing.comErrorLog E:/InterRoot/iptv_for_browser/serverlog/apache.logAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from allDocumentRoot E:\InterRoot\billing_new\frontServerName admin.billing.comErrorLog E:/InterRoot/iptv_for_browser/serverlog/apache.logAllowOverride FileInfoOptions Indexes FollowSymLinks IncludesOrder allow,denyAllow from all相关文章 这篇文章主要介绍了apache下面二级目录部署react/vue的方法小编觉得挺不错的现在分享给大家也给大家做个参考。一起跟随小编过来看看吧2018-08-08这篇文章主要介绍了Linux 添加开机启动方法(服务/脚本)文中通过示例代码介绍的非常详细对大家的学习或者工作具有一定的参考学习价值需要的朋友们下面随着小编来一起学习学习吧2019-12-12本篇文章主要介绍了Linux定时任务Crontab详解具有一定的参考价值感兴趣的小伙伴们可以参考一下。2016-12-12这篇文章主要介绍了如何优雅地删除 Linux 中的垃圾文件的方法文中通过示例代码介绍的非常详细对大家的学习或者工作具有一定的参考学习价值需要的朋友们下面随着小编来一起学习学习吧2020-03-03这篇文章主要介绍了linux Bash脚本判别使用者的身份方法示例小编觉得挺不错的现在分享给大家也给大家做个参考。一起跟随小编过来看看吧2019-01-01这篇文章主要介绍了关于linux中ssh超时自动登出时间的设置方法以避免总是被强行退出。需要的朋友可以参考借鉴下面来一起看看吧。2017-02-02LAMP服务器性能优化技巧之Linux主机优化由于LAMP的发展迅速如今LAMP已经成为Web服务器的标准。如何才能优化LAMP服务器的性能2012-02-02Sysctl指令是对系统核心参数的设置下面这篇文章主要给大家介绍了关于Linux利用Sysctl命令调整内核参数的相关资料文中通过示例代码介绍的非常详细需要的朋友可以参考借鉴下面随着小编来一起学习学习吧。2018-01-01一般来说对 Linux 系统的安全设定包括取消不必要的服务、限制远程存取、隐藏重要资料、修补安全漏洞、采用安全工具以及经常性的安全检查等,本文为大家分享Linux/CentOS服务器安全配置的通用方案2018-10-10这篇文章主要介绍了ubuntu下kvm 命令行安装64位ubuntu报Couldnt find hvm kernel for Ubuntu tree.的问题分析的相关资料,需要的朋友可以参考下2016-11-11最新评论