惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
Schneier on Security
Schneier on Security
V2EX - 技术
V2EX - 技术
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
O
OpenAI News
S
Security @ Cisco Blogs
Scott Helme
Scott Helme
Security Archives - TechRepublic
Security Archives - TechRepublic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
T
Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
Microsoft Azure Blog
Microsoft Azure Blog
Know Your Adversary
Know Your Adversary
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
Forbes - Security
Forbes - Security
NISL@THU
NISL@THU
Security Latest
Security Latest
G
Google Developers Blog
D
Docker
T
Threat Research - Cisco Blogs
N
Netflix TechBlog - Medium
C
CERT Recently Published Vulnerability Notes
H
Help Net Security
B
Blog
Martin Fowler
Martin Fowler
N
News and Events Feed by Topic
Simon Willison's Weblog
Simon Willison's Weblog
Hacker News - Newest:
Hacker News - Newest: "LLM"
L
Lohrmann on Cybersecurity
Y
Y Combinator Blog
PCI Perspectives
PCI Perspectives
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
Project Zero
Project Zero
爱范儿
爱范儿
Cisco Talos Blog
Cisco Talos Blog
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
V
Vulnerabilities – Threatpost
P
Proofpoint News Feed
Cyberwarzone
Cyberwarzone
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
N
News | PayPal Newsroom
Recorded Future
Recorded Future

博客园 - 可可

广东电信最新DNS更新了 分布式缓存失效处理 序列化 suse中计划任务工具cron的使用 转载《.NET框架设计之五------------异常设计(异常与返回值)》 《高级Bash脚本编程指南》在线阅读 转载《Linux Shell Bash 各种小技巧》 Linux多线程例子 转载《Adding a Second IP Address to an Existing Network Adapter on Linux》 SuSE下chkconfig的启动脚本参考例子"/etc/init.d/skeleton” - 可可 - 博客园 转载《Starting and Stoping Services: insserv》 linux下c++程序编译错误--理解typename 一个公网IP情况下实现LVS VS/DR vmware中suse10不能上网解决方法 Apache Configuration PHP在Apache中两种工作方式的区别(CGI模式、Apache 模块DLL) SSO 转贴《负载均衡技术介绍》 CDN
Using PHP with mod_fcgid
可可 · 2009-02-02 · via 博客园 - 可可

转载地址:http://typo3.org/development/articles/using-php-with-mod-fcgid/page/3/

Configuration

  1. Remove mod_php4 / mod_php5 if not already done 

    # a2dismod php4
    # a2dismod php5

  2. Enable mod_actions and mod_fcgid 

    # a2enmod actions
    # a2enmod fcgid

  3. Raise the communication timeout (= maximum execution time) for FCGI applications in /etc/apache2/mods-enabled/fcgid.conf by adding the “IPCCommTimeout” directive 

    <IfModule mod_fcgid.c>
        AddHandler fcgid-script .fcgi
        SocketPath /var/lib/apache2/fcgid/sock
        
        # Communication timeout: Default value is 20 seconds
        IPCCommTimeout 60
        
        # Connection timeout: Default value is 3 seconds
        
        #IPCConnectTimeout 3
    </IfModule>

  4. Create a new file /etc/apache2/conf.d/php-fcgid.conf: 

    <IfModule !mod_php4.c>
    <IfModule !mod_php4_filter.c>
    <IfModule !mod_php5.c>
    <IfModule !mod_php5_filter.c>
    <IfModule !mod_php5_hooks.c>
    <IfModule mod_actions.c>
    <IfModule mod_alias.c>
    <IfModule mod_mime.c>
    <IfModule mod_fcgid.c>
        # Path to php.ini – defaults to /etc/phpX/cgi
        DefaultInitEnv PHPRC=/etc/php5/cgi
        
        # Number of PHP childs that will be launched. Leave undefined to let PHP decide.
        #DefaultInitEnv PHP_FCGI_CHILDREN 3
        
        # Maximum requests before a process is stopped and a new one is launched
        #DefaultInitEnv PHP_FCGI_MAX_REQUESTS 5000
        
        # Define a new handler "php-fcgi" for ".php" files, plus the action that must follow
        AddHandler php-fcgi .php
        Action php-fcgi /fcgi-bin/php-fcgi-wrapper
        
        # Define the MIME-Type for ".php" files
        AddType application/x-httpd-php .php
        
        # Define alias "/fcgi-bin/". The action above is using this value, which means that
        # you could run another "php5-cgi" command by just changing this alias
        Alias /fcgi-bin/ /var/www/fcgi-bin.d/php5-default/
        
        # Turn on the fcgid-script handler for all files within the alias "/fcgi-bin/"
        <Location /fcgi-bin/>
            SetHandler fcgid-script
            Options +ExecCGI
        </Location>
    </IfModule>
    </IfModule>
    </IfModule>
    </IfModule>
    </IfModule>
    </IfModule>
    </IfModule>
    </IfModule>
    </IfModule>

  5. Next, create the directory which is chosen by the alias, and put in a symlink to the php5-cgi binary 

    # mkdir /var/www/fcgi-bin.d/php5-default
    # ln -s /usr/bin/php5-cgi /var/www/fcgi-bin.d/php5-default/php-fcgi-wrapper

  6. Finally, restart Apache 

    # /etc/init.d/apache2 restart