apache 部署多 PHP 版本、多项目以及二级域名 
                                                    
                        
                    
                    
  
                    
                    本地开发环境已经用homestead了,但是还是记录一下,也许有朋友会需要。主要是安装 mod_fcgid模块(linux),(windows版模块下载地址)以及配置文件的变动。
这里就不记录安装过程了,简单记录一下配置文件,方便日后复制粘贴。windows和linux略有不同,不过appserv比较贴近原生,感觉差别不大。一.httpd.conf
    AddHandler fcgid-script .php
    FcgidInitialEnv PHP_FCGI_MAX_REQUESTS      1000
    FcgidMaxRequestsPerProcess       1000
    FcgidMaxProcesses             15
    FcgidIOTimeout             300
    FcgidIdleTimeout                300
    AddType application/x-httpd-php .php
    #默认虚拟主机,其中FcgidInitialEnv是php.ini的存放目录,Linux下通常不需要
    FcgidInitialEnv PHPRC "D:/AppServ/php5/"
    FcgidWrapper "D:/AppServ/php5/php-cgi.exe" .php二.httpd-vhosts.conf
<VirtualHost ip:80>
    ServerName www.abc.com
    DocumentRoot "/data/www/www.abc.com"
    <Directory "/data/www/www.abc.com">
        Options -Indexes +FollowSymLinks +ExecCGI
        AllowOverride All
        Require all granted
    </Directory>
    FcgidInitialEnv PHPRC "D:/AppServ/php7"
    FcgidWrapper "D:/AppServ/php7/php-cgi.exe" .php
</VirtualHost>本作品采用《CC 协议》,转载必须注明作者和本文链接
 
           北极冰 的个人博客
 北极冰 的个人博客
         
             
                     
                     
           
           关于 LearnKu
                关于 LearnKu
               
                     
                     
                     粤公网安备 44030502004330号
 粤公网安备 44030502004330号 
 
推荐文章: