第一步:配置Apache 的 httpd.conf

#Listen 0.0.0.0:80
Listen 80
Listen 81

第二步:开启虚拟站点

所属文件:httpd.conf

#Virtual hosts
#Include conf/extra/httpd-vhosts.conf
修改为

# Virtual hosts

Include conf/extra/httpd-vhosts.conf

第三步:配置conf/extra/httpd-vhosts.conf

<VirtualHost *:81>
 ServerAdmin webmaster@dummy-host.localhost
 DocumentRoot "/data/wwwroot"
 ServerName 81
 ErrorLog "logs/dummy-host.localhost-error.log"
 CustomLog "logs/dummy-host.localhost-access.log" common
 <Directory "/data/wwwroot">
  Options FollowSymLinks
  AllowOverride None
  Require all granted
 </Directory>
</VirtualHost>

如果访问站点出现you don't have permission to access / on this server(Apache Server权限访问问题)

修改httpd.conf:
 
<Directory />
 AllowOverride none
 Require all denied
</Directory>

<Directory />
 AllowOverride none
# Require all denied
</Directory>

Apache Wamp WampServer 配置多端口 多站点 虚拟目录的更多相关文章

  1. apache单ip配置多端口多站点

    1.修改 /etc/httpd/conf/httpd.conf 添加一个Listen,如: Listen 80 Listen 8001 Listen 8002 2.添加一个VirtualHost #v ...

  2. Apache配置基于端口号的虚拟主机 Apache virtual host configuration is based on the port

    有可能只有一个ip出口,但却有多个项目,那么就需要基于端口号架设虚拟主机. Step 1: 检查是否开启 httpd-vhosts.conf apache/conf/httpd.conf文件 # Vi ...

  3. 服务器资源共享--IIS站点/虚拟目录中访问共享目录(UNC)

    本文重点描述如何使用IIS访问共享资源来架设站点或执行 ASP.Net 等脚本. 通常情况下,拥有多台服务器的朋友在使用IIS建立站点的时候,会遇到如何把多台服务器的资源合并到一起的问题.如何让A服务 ...

  4. IIS站点/虚拟目录中访问共享目录(UNC)以及建立后的应用程序的信任级别问题

      UNC是 Universal Naming Convention 的简称,也叫通用命名规范.通用命名约定.网络(范指局域网)上资源的完整位置名称.格式为 \\servername\sharenam ...

  5. Apache配置多端口多站点

    配置httpd.conf 监听多个端口 复制代码 代码如下:# Listen: Allows you to bind Apache to specific IP addresses and/or # ...

  6. WampServer配置可局域网访问站点

    一 WampServer3.1.7版本 二 需求:项目开发阶段,服务器还未购买,前端需要调用接口进行测试,于是想到了在本地搭设一个站点,可以局域网内访问 三 先为这个项目单独在本地设置一个端口,比如我 ...

  7. WAMP配置虚拟目录

    1.启动wamp所有服务,输入localhost或localhost:端口号确保wamp环境正常无误. 2.设置httpd.conf 2.1打开文件:单击wamp在电脑右下角的图标=>wamp= ...

  8. Jupyter Notebook的配置(密码端口+远程登陆+nbextension)

    1 生成配置文件 linux和mac系统打开终端 windows系统打开anaconda自带的终端 jupyter notebook --generate-config 此时系统会生成 ~/.jupy ...

  9. Nginx 虚拟目录和虚拟主机的配置

    nginx.conf 配置文件的几个常用命令 nginx 配置文件主要分为六个区域: main: 全局设置 events: nginx工作模式 http: http设置 sever: 主机设置 loc ...

随机推荐

  1. c# 两个数组比较,将重复部分去掉,返回不重复部分

    List<string> Ashuzu = new List<string>(); Ashuzu.Add("); Ashuzu.Add("); List&l ...

  2. DTCMS中文章增加tags标签和关键词时中文,替换为英文状态,

    DTCMS.Web\admin\article\article_edit.aspx 找到添加和修改的方法 model.tags = txtTags.Text.Trim()model.seo_keywo ...

  3. asp:HyperLink vs asp:LinkButton

    asp:HyperLink NavigateUrl - 页面刷新为新的页面 pageload ispostback = false asp:LinkButton PostbackUrl - postb ...

  4. Tomcat & Nginx

    http://cxshun.iteye.com/blog/1535188 反向代理方式实际上就是一台负责转发的代理 服务器,貌似充当了真正服务器的功能,但实际上并不是,代理服务器只是充当了转发的作用, ...

  5. 解决mac下eclipse字体模糊

    在eclipse.app右键,单击“显示包内容”,如下图: 2.找到"info.plist"文件并打开,在文件最后插入配置“<key>NSHighResolutionC ...

  6. RHEL 7.2 安装Oracle XE-11.2.0

    轻量快捷版本,适合开发 0. /etc/hosts 添加 本机hostname # hostnamepromote.cache-dns.local # cat /etc/hosts127.0.0.1 ...

  7. Postgresql 技巧

    备份 pg_dump -f "F:/dump.sql"<file name> -U postgres<database name> -h 10.38.197 ...

  8. Calendar GData API / Google Calendar Connectors deprecation

    http://googleappsupdates.blogspot.fr/2014/06/calendar-gdata-api-google-calendar.html

  9. linux驱动系列之makefile

    在linux环境下做嵌入式无论是编写应用程序还是驱动程序等等,都需要用make来进行程序的编译,就需要学会自己编写Makefile.Makefile主要的作用有3点:1.决定编译哪些文件 2.怎样编译 ...

  10. EasyUI datagrid 分页Json字符串格式

    //EasyUI datagrid 分页Json字符串格式 //{"total":xx,"rows":[{...},{...}]} total:总数 rows: ...