Apache多站点设定
2015-08-12 10:47
218 查看
多端口
另外一种方式
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>
相关文章推荐
- 在Linux下编译安装Apache2(2)
- 在Linux下编译安装Apache2(1)
- 使用Apache的IOUtils实现文件下载
- Apache、php错误与配置(一)
- fedora21 配置apache共享文件目录
- apache学习笔记
- centos apache zeppelin install
- 开源许可证GPL、BSD、MIT、Mozilla、Apache和LGPL的区别
- 使用WampServer绑定虚拟域名
- junit集成maven。 No SecurityManager accessible to the calling code, either bound to the org.apache.shir
- VS2010调用apache APR 编译的静态库
- 使用 Google Web Toolkit、Apache Derby 和 Eclipse 构建 Ajax 应用程序
- S3C6410移植apache和php
- apache 防盗链
- apache的扩展模块安装
- php5.4和apache2.4.9不在同一台服务器的配置注意事项
- apache 日志切割
- php5.5 + apache2.4 安装配置
- Apache Helix简介
- lamp(二) apache 配置