ubuntu apache fastcgi 虚拟主机安装
2013-06-28 18:35
323 查看
1 cp /etc/apache2/sites-available/default /etc/apache2/sites-available/www.domain.com
这里www.domain.com就是虚拟主机的配置文件(当然文件名可任意)
2 编辑这个配置文件,在<VirtualHost *:80>后直接加上
ServerName www.domain.com
此句说明虚拟主机的域名为www.domain.com;
同时请删除这一行:(笔者使用的是fastcgi模式,若不是此模式,此项操作不一定需要)
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 120 -pass-header Authorization
不然重启apache时会报 错,内容 为:
FastCgiExternalServer: redefinition of previously defined class "/usr/lib/cgi-bin/php5-fcgi" Action 'configtest' failed.
3 接下来启用这个配置文件
a2ensite www.domain.com
4 重启apache
service apache2 reload
若重启失败,显示信息为:apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName,
可修改 /etc/apache2/httpd.conf文件(一般此文件为空),加上如下一句:
ServerName localhost
再重启就OK了
这里www.domain.com就是虚拟主机的配置文件(当然文件名可任意)
2 编辑这个配置文件,在<VirtualHost *:80>后直接加上
ServerName www.domain.com
此句说明虚拟主机的域名为www.domain.com;
同时请删除这一行:(笔者使用的是fastcgi模式,若不是此模式,此项操作不一定需要)
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 120 -pass-header Authorization
不然重启apache时会报 错,内容 为:
FastCgiExternalServer: redefinition of previously defined class "/usr/lib/cgi-bin/php5-fcgi" Action 'configtest' failed.
3 接下来启用这个配置文件
a2ensite www.domain.com
4 重启apache
service apache2 reload
若重启失败,显示信息为:apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName,
可修改 /etc/apache2/httpd.conf文件(一般此文件为空),加上如下一句:
ServerName localhost
再重启就OK了
相关文章推荐
- ubuntu apache fastcgi 虚拟主机安装
- Ubuntu Linux Apache虚拟主机的安装配置
- [Linux] Ubuntu_9.04_server安装nginx+php(fastcgi)+nginx虚拟主机配置格式
- ubuntu下apt-get安装apache的虚拟主机的配置
- centos7编译安装apache后添加用户认证和配置虚拟主机
- ubuntu 下 Apache虚拟主机的配置
- Apache 虚拟主机的配置[Ubuntu]
- win2003系统下apache、php、mysql安装以及虚拟主机和目录权限设置(转载)
- 【转】win2003系统下apache、php、mysql安装以及虚拟主机和目录权限设置
- ubuntu Apache虚拟主机指南
- centos7安装Apache虚拟主机
- Ubuntu下Apache虚拟主机+反向代理
- APACHE环境下同IP多域名虚拟主机的设置方案全攻略[ubuntu 12, linux]
- Ubuntu下apache的多虚拟主机配置
- Ubuntu下配置Apache的虚拟主机
- Ubuntu下配置Apache的虚拟主机
- Ubuntu apache 虚拟主机配置
- 55 ip 域名以及dns 56.Apache安装及虚拟主机配置 ...23
- 在Ubuntu 14.04 LTS系统中设置Apache虚拟主机
- ubuntu 14.04设置Apache虚拟主机的方法