Bài đăng

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

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 ...

Configure NginX, PHP-FPM, APC & Varnish For WordPress

This guide will show you how to configure varnish for WordPress along with APC, NginX and PHP-FPM.  Wordpress has gained massive popularity and currently accounts for a decent slice of the internets webpages.  In the recent years, the makers of WordPress have seen a massive surge in its community, bringing new plugins and themes to the table.  It is incredibly extensive and the api vast, but with this expansion also comes a problem.  Wordpress is not known for vetting plugins, so whenever you install a free plugin, or even some paid plugins, you run the risk of introducing poor code into your site.  Perhaps code that will either break functionality, or slow your site’s speed down to a halt. This guide assumes that you have knowledge of WordPress and that you are proficient using command line in a server environment.  Enough talk, Lets dive into a setup that I personally use on all my WordPress blogs to keep content flowing smoothly and most of all, fas...