apache配置多端口对应多个站点

作者: king 分类: Lamp 发布时间: 2017-06-21 23:50

apache配置多端口的站点(就是一个端口一个站点)

系统:centos
环境:lamp+fcgi

appache配置文件位置: usr/local/apache2/conf/httpd.conf

1. 首先把新站点的文件夹命名为www2,把www2的文件移动到/yjdata/www/www目录下

2. 然后打开httpd.conf配置文件,找到Listen 80,另起一行写入Listen 7070

3. 继续httpd.conf配置文件,找到最下面的
<VirtualHost *:80>
DocumentRoot /yjdata/www/www/
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/yjdata/www/www/$1
DirectoryIndex index.html index.php
ProxyTimeout 3600
</VirtualHost>
在下面追加那个7070端口的站点信息如下:

<VirtualHost *:7070>
DocumentRoot /yjdata/www/wwww/www2
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/yjdata/www/www/www2/$1
DirectoryIndex index.html index.php
ProxyTimeout 3600
</VirtualHost>

一条评论
  • king

    2017年6月22日 下午12:05

    Hao

发表评论

邮箱地址不会被公开。 必填项已用*标注

标签云