Bài đăng

Hiển thị các bài đăng có nhãn FastCGI

Proxying to FastCGI in Ubuntu/Apache 2.4

Ubuntu 12.04 In Apache under Ubuntu 12.04 LTS, to pass a request off to a FastCGI process (such as PHP-FPM), I usually installed libapache2-mod-fastcgi . It looked something like this: $ sudo add-apt-repository -y ppa:ondrej/apache2 $ sudo apt-key update $ sudo apt- get update $ sudo apt- get install -y apache2 apache2-mpm- event libapache2- mod -fastcgi This was nice as it would allow the use of one configuration file for handling all FastCGI requests. For example, to hand off requests to PHP-FPM. I'd create /etc/apache2/conf-available/php5-fpm.conf :   <IfModule mod_fastcgi.c> AddHandler php5-fcgi .php Action php5-fcgi /php5-fcgi Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization <Directory /usr/lib/cgi-bin> Options ExecCGI FollowSymLinks SetHandler fastcgi-script ...