独立服务器linux系统apache配置站点的方法.doc

独立服务器linux系统apache配置站点的方法.doc

  1. 1、本文档共3页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
独立服务器linux系统apache配置站点的方法

独立服务器linux系统apache配置站点的方法 2010-01-27 12:19:22|??分类: linux 阅读226 评论0 ??字号:大中小?订阅 独立服务器linux系统apache配置站点的方法: 1,服务器端apache的配置文件路径:vi /usr/local/apache/conf/httpd.conf NameVirtualHost *:80 Include conf/vhosts 2,apache里面站点配置方法: mkdiv /usr/local/apache/conf/vhosts vi /usr/local/apache/conf/vhosts/.conf VirtualHost *:80 ServerAdmin admin@ ServerName ServerAlias DocumentRoot /var/www/ DirectoryIndex index.html index.htm index.php ErrorLog /usr/local/apache/logs/-error_log.log CustomLog /usr/local/apache/logs/-access_log.log common ErrorDocument 404 Directory /var/www/ AllowOverride All Options FollowSymLinks Order Deny,Allow Allow from all /Directory /VirtualHost 修改完毕,保存上述配置. 3,重新启动apache,命令如下:/usr/local/apache/bin/apachectl restart,重启后就可以正常的浏览您的网页文件 1、多IP多端口多站点配置 修改APACHE的配置文件httpd.conf ——————————————————— Listen 0:80 Listen 0:8080 Listen 0:80 Listen 0:8080 VirtualHost 0:80 DocumentRoot /www/example1-80 ServerName /VirtualHost VirtualHost 0:8080 DocumentRoot /www/example1-8080 ServerName /VirtualHost VirtualHost 0:80 DocumentRoot /www/example2-80 ServerName /VirtualHost VirtualHost 0:8080 DocumentRoot /www/example2-8080 ServerName /VirtualHost ———————————————————— 2、多IP单端口多站点 ———————————————————– VirtualHost :80 DocumentRoot “/usr/local/apache/a” ServerName ServerAlias DirectoryIndex index.html index.php /VirtualHost NameVirtualHost :80 VirtualHost :80 DocumentRoot “/usr/local/apache/b” ServerName ServerAlias DirectoryIndex index.php /VirtualHost VirtualHost :80 DocumentRoot “/usr/local/apache/c” ServerName ServerAlias DirectoryIndex index.php /VirtualHost ————————————————————— 3、单IP单端口多站点 ————————————————————— Listen 80 NameVirtualHost 5 #接收请求的IP地址 VirtualHost 5 #绑定的ip ServerAdmin test@ #管理员邮箱 DocumentRoot “D:/Inetpub/www/maidou/” #网站目录 ServerName #主机名(域名) DirectoryIndex index.php #主目录默认页 ServerAlias #做出响应的域名 ErrorLog logs/error_log.log #错误日志 CustomLog logs/custom.log common #用户日志 Directory “D:/Inetpub/www/maidou/” Options Indexes FollowSymLinks AllowOve

文档评论(0)

2017ll + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档