# apache 安装记录

# apache 安装记录

apachectl -t 检测错误信息

cgi 模式

参考文章:Run PHP Applications under CGI with Apache on Debian 5

Local 8021 cgi

a2enmod actions
ScriptAlias /local-bin /usr/bin
AddHandler application/x-httpd-php5 php
Action application/x-httpd-php5 /local-bin/php-cgi

fastcgi 模式

a2enmod proxy
a2enmod proxy_fcgi
<FilesMatch "\.php$">
    SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost"
</FilesMatch>
<FilesMatch "\.php$">
    SetHandler  "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
%60apachectl%20-t%60%20%E6%A3%80%E6%B5%8B%E9%94%99%E8%AF%AF%E4%BF%A1%E6%81%AF%0A%0A%23%23%20cgi%20%E6%A8%A1%E5%BC%8F%0A%E5%8F%82%E8%80%83%E6%96%87%E7%AB%A0%EF%BC%9A%5BRun%20PHP%20Applications%20under%20CGI%20with%20Apache%20on%20Debian%205%5D(https%3A%2F%2Fwww.linode.com%2Fdocs%2Fwebsites%2Fapache%2Frun-php-applications-under-cgi-with-apache-on-debian-5-lenny)%0A%5BLocal%208021%20cgi%5D(http%3A%2F%2F192.168.1.103%3A8021%2Finfo.php)%0A%0A%60%60%60%0Aa2enmod%20actions%0A%60%60%60%0A%60%60%60%0AScriptAlias%20%2Flocal-bin%20%2Fusr%2Fbin%0AAddHandler%20application%2Fx-httpd-php5%20php%0AAction%20application%2Fx-httpd-php5%20%2Flocal-bin%2Fphp-cgi%0A%60%60%60%0A%0A%23%23%20fastcgi%20%E6%A8%A1%E5%BC%8F%0A%0A%60%60%60%0Aa2enmod%20proxy%0Aa2enmod%20proxy_fcgi%0A%60%60%60%0A%60%60%60%0A%3CFilesMatch%20%22%5C.php%24%22%3E%0A%20%20%20%20SetHandler%20%22proxy%3Aunix%3A%2Fvar%2Frun%2Fphp5-fpm.sock%7Cfcgi%3A%2F%2Flocalhost%22%0A%3C%2FFilesMatch%3E%0A%60%60%60%0A%60%60%60%0A%3CFilesMatch%20%22%5C.php%24%22%3E%0A%20%20%20%20SetHandler%20%20%22proxy%3Afcgi%3A%2F%2F127.0.0.1%3A9000%22%0A%3C%2FFilesMatch%3E%0A%60%60%60%0A%0A

原文地址 : # apache 安装记录
本站是作者语雀文档的镜像站, 如对文章有任何疑问请移步语雀进行 提问

作者

Duoli

发布于

2022-04-14

更新于

2022-08-24

许可协议

评论