多端口

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. Jordan Lecture Note-12: Kernel典型相关分析(Kernel Canonical Correlation Analysis, KCCA).

    Kernel典型相关分析 (一)KCCA 同样,我们可以引入Kernel函数,通过非线性的坐标变换达到之前CCA所寻求的目标.首先,假设映射$\Phi_X: x\rightarrow \Phi_X(x ...

  2. 计算 MD5值

    // // MD5Value.h // iOSEdu // // Created by littest on 16/2/26. // Copyright © 2016年 littest. All ri ...

  3. iOS 生成本地验证码

    在应用程序注册.登陆或者有关支付确认的界面,经常会用到验证码,验证码有的是通过手机发送获取的,有的是在本地点击获取的,通过手机发送获取的动态验证码可以使用第三方类库实现,本地点击获取的是在本地自己绘制 ...

  4. javaweb学习总结十五(web开发的相关概念以及常用服务器介绍)

    一:java web开发的相关概念 1:web分为静态web和动态web 2:模拟web服务器 web页面如果想让外部网络访问,必须通过网络程序读取资源,流程: a:用户通过浏览器访问网络程序 b:网 ...

  5. MySQL 更改默认编码为 utf8 (转)

      转自blog.sina.com.cn/s/blog_4c451e0e0100vefm.html 1.打开MySQL安装目录找到 my.ini,如:C:\Program Files\MySQL\My ...

  6. [改善Java代码]不要让类型默默转换

    建议23:不要让类型默默转换 public class Client { // 光速是30万公里/秒,常量 public static final int LIGHT_SPEED = 30 * 100 ...

  7. (转载)Java NIO:NIO概述(一)

    Java NIO:NIO概述 在上一篇博文中讲述了几种IO模型,现在我们开始进入Java NIO编程主题.NIO是Java 4里面提供的新的API,目的是用来解决传统IO的问题.本文下面分别从Java ...

  8. 设置transparent是否多此一举

    在css是设置中我们经常会用到background:transparent这一属性设置,表示背景透明.但是background默认的颜色就是透明的!那么设置是否属于多此一举呢?我们浏览网页时经常见到“ ...

  9. Ehcache(2.9.x) - API Developer Guide, Cache Usage Patterns

    There are several common access patterns when using a cache. Ehcache supports the following patterns ...

  10. Ubuntu中wine安装的程序如何卸载

    很多朋友尝试在Ubuntu中用wine安装exe格式的应用程序,但经常遇到装完之后启动程序就崩溃.或者根本无法启动.无法使用的情况,于是想立即把安装的程序卸载,可是在wine中却找不到卸载exe软件的 ...