多端口

vi httpd.conf
Listen 8090
<VirtualHost *:8090>
ServerName localhost
Documentroot "/Users/dir/8090"
</virtualHost>
<Directory "/Users/dir/8090">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

另外一种方式

vhost设定

http.conf
<Directory /> AllowOverride none #Require all denied </Directory> 加载vhost.conf vhost.conf
<VirtualHost *:80>
#ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/Users/zhoutingze/project/maturi/maturi/docroot/web"
ServerName adtuu-project.com
ServerAlias www.adtuu-project.com
#ErrorLog "logs/dummy-host2.example.com-error_log"
#CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost> <Directory "/Users/zhoutingze/project/maturi/maturi/docroot/web">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory> <VirtualHost *:80>
#ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/Users/zhoutingze/webroot"
ServerName adtuu-server.com
ServerAlias www.adtuu-server.com
#ErrorLog "logs/dummy-host2.example.com-error_log"
#CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost> <Directory "/Users/zhoutingze/webroot">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory> # Virtual Hosts
#
# Required modules: mod_log_config # If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration. #
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
#ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/Users/zhoutingze/project/maturi/maturi/docroot/web"
ServerName adtuu-project.com
ServerAlias www.adtuu-project.com
#ErrorLog "logs/dummy-host2.example.com-error_log"
#CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost> <Directory "/Users/zhoutingze/project/maturi/maturi/docroot/web">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory> <VirtualHost *:80>
#ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/Users/zhoutingze/webroot"
ServerName adtuu-server.com
ServerAlias www.adtuu-server.com
#ErrorLog "logs/dummy-host2.example.com-error_log"
#CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost> <Directory "/Users/zhoutingze/webroot">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

  

Apache多站点设定的更多相关文章

  1. Apache多站点配置及启动失败解决办法

    一. Apache多站点配置方法 1.打开Apache安装目录下conf/httpd.conf文件,找到下面两行文字,把最前面的 # 号去掉,然后保存. #LoadModule vhost_alias ...

  2. Apache多站点实现原理和配置

    Apache多站点实现原理 很多人常常看到一台服务器上跑多个站点,不同的域名访问不同的站点,就会有个疑惑:访问的时候并没有在地址栏中加入端口号,多个域名都是解析到这个服务器的IP地址,服务器怎么能够正 ...

  3. apache多站点配置

    apache多站点配置 临时需要个测试站,然后就到apache中配置vhosts,结果这货总是显示"拒绝了你的请求",找半天发现居然还要添加端口监听 vhosts.conf 添加v ...

  4. apache多站点配置+多端口配置

    Apache多站点配置 这种方法是配置不同的地址访问不同的文件夹的配置 1:修改本机的hosts文件,如下: 示例: 127.0.0.1 localhost 127.0.0.1 www.dede.co ...

  5. Apache 多站点(虚拟主机)

    普遍 apache多站点(灰色(连接一起的红色)字体 为命令) 编辑文件:httpd.conf 找到以下内容: # Virtual hosts # Include /private/etc/apach ...

  6. CentOS配置apache多站点设置

    配置文件目录: /etc/httpd/conf.d /etc/httpd/conf/httpd.conf 错误日志文件在哪里? 网站文件目录: /var/www/html (Ubuntu/Centos ...

  7. apache 多站点配置

    安装时可以选择gbk-gb2312的编码(我自己用utf-8). 2: 修改本机的hosts文件,如下: 示例:127.0.0.1            localhost127.0.0.1      ...

  8. Apache配置站点根目录、用户目录及页面访问属性

    一.配置站点根目录及页面访问属性 DocumentRoot "/www/htdoc" <Directory "/www/htdoc"> Option ...

  9. APACHE 多站点配置方法

    例如你的主机IP:192.168.1.8 而你有三个站点,域名为:www.111.com,www.222.com,www.333.com 相应的网站文件放在主机的:\website\111;D:\we ...

随机推荐

  1. LeetCode: Validata Binary Search Tree

    LeetCode: Validata Binary Search Tree Given a binary tree, determine if it is a valid binary search ...

  2. VBA Excel 引用 API,以实现“透明”

    1. 引用 API 函数 ' API函数Public Declare Function FindWindow Lib "user32" Alias "FindWindow ...

  3. visual studio 因为文件过期重新编译项目

    最近visual studio总是莫名其妙的重新编译某个工程,  导致大量项目rebuild . 蛋都碎了... 查了好久, 这种无厘头的问题最烦了 参考这篇文章, http://blogs.msdn ...

  4. 小白日记21:kali渗透测试之提权(一)--本地提权

    本地提权 简单地说,本地提权漏洞就是说一个本来非常低权限.受限制的用户,可以提升到系统至高无上的权限.权限提升漏洞通常是一种"辅助"性质的漏洞,当黑客已经通过某种手段进入了目标机器 ...

  5. 小白日记20:kali渗透测试之后渗透测试阶段(一)--上传工具

    后渗透测试阶段--上传工具 为防止管理员将漏洞补上后,我们无法再通过该漏洞控制对方主机,所以需要进行后渗透测试阶段 1.上传各种工具 2.提权:为了全面控制目标系统 3.擦除攻击痕迹:防止管理员通过日 ...

  6. iOS语音合成

    苹果公司在iOS7中推出了语音合成的技术,无需网络环境也可以实现语音合成. iOS7语音合成的主要的API如下: 1.AVSpeechUtterance,是语音合成的基本单位,它封装影响语音合成的需要 ...

  7. cocos2d-x lua 使用http(下载图片, POST JSON)

    cocos2d-x lua 使用http(下载图片, POST JSON) version: cocos2d-x 3.6 1.使用http post json与服务器交互 require(" ...

  8. SQL Server2008附加数据库失败

    今天旁晚时分,我准备把老师在上课时候发给我们的一个数据库附加到我的SQL Server2008上面去,本来在学校机房用的SQL Server2000是很顺利地就成功了,但是把*.mdf文件附加到我的0 ...

  9. Angular 2 从0到1 (三)

    作者:王芃 wpcfan@gmail.com 第一节:Angular 2.0 从0到1 (一)第二节:Angular 2.0 从0到1 (二)第三节:Angular 2.0 从0到1 (三)第四节:A ...

  10. Junit,hamcrest和Eclemma安装及使用

    Junit和hamcrest下载及安装 下载地址 Junit      http://download.csdn.net/detail/luzle/6915487 Hamcrest  http://d ...