zoukankan      html  css  js  c++  java
  • ubuntu apache fastcgi 虚拟主机安装

    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了


  • 相关阅读:
    Python3中urllib使用介绍
    python urllib和urllib3包
    Python--urllib3库
    Python基础-变量作用域
    Python 面向对象三(转载)
    Python 面向对象二(转载)
    Python 面向对象一(转载)
    YAML 在Python中的应用
    Redis 命令二
    基于Redis的Bloomfilter去重(转载)
  • 原文地址:https://www.cnblogs.com/snake-hand/p/3161378.html
Copyright © 2011-2022 走看看