![]() Php 5.6 has Zend Opcache built in, although it doesn’t have user caches. I just set it up on a newer machine running Debian 8 with Apache 2.4, and php 5.6 and looked a little closer at phpinfo output, and it raised a few questions.ġ. Ok, I’ve been using this setup for a while, mostly undisturbed except for adding a few sites. PHP-FPM: Mit der Lizenz zum Verwalten, de, Īpache2, PHP-FPM, FastCGI and APC Opcode Cache, fr, some ideas why to go for FastCGI and Opcode CacheįastCGI with a PHP APC Opcode Cache, en, Installing apache + mod_fastcgi + php_fpm on …, en, Use php-fpm with apache in debian (mod_fastcgi), en, Īpache2 mpm worker + fastcgi + php5-fpm on debian, en, Īpache Worker, FastCGI, PHP-FPM and APC, en, explaining differences, more in detail Options Indexes FollowSymLinks MultiViewsĪlias /fcgi-bin/php5-fpm /fcgi-bin-php5-fpm-tuxįastCgiExternalServer /fcgi-bin-php5-fpm-tux -socket /var/run/php5-fpm-tux.sock -pass-header AuthorizationĬustomLog $/access.log combinedĮnable new virtual host and restart apache. ![]() Tux 12069 12065 0 15:36 ? 00:00:00 php-fpm: pool tuxĬreate a virtual host config for which tux is the owner. service php5-fpm restartĬheck if new PHP-FPM instances are running. keep care of ownership and permissions.Ĭreate an additional PHP-FPM pool for user tux by just copying ![]() Looks like overkill to have only the htdocs directory, but be prepared for some directories like log, session, tmp, …Ī small index.php for tux could have the following code. let’s partyĬreate a new user and add mkdir -p /var/www/tux/htdocs be careful with the Alias directory-path, don’t use any slashes as described here.Īt this point you should be already able to run PHP scripts with PHP-FPM as user lets go forward. the Alias is needed in any case, especially later when you go for running PHP as an other user. virtual here means it will not be checked if the given file exists. for the Handler a virtual Action is defined. # only after an internal redirect (by Action upper)įastCgiExternalServer /fcgi-bin-php5-fpm -socket /var/run/php5-fpm.sock -pass-header Authorizationįor every PHP file a Handler will be set and also some access restrictions. # env=REDIRECT_STATUS will let us use this fcgi-bin url # here we prevent direct access to this Location url, # Define Action and Alias needed for FastCGI external server.Īction application/x-httpd-php /fcgi-bin/php5-fpm virtualĪlias /fcgi-bin/php5-fpm /fcgi-bin-php5-fpm # Deny access to files without filename (e.g. # only in specific virtual host or directory # To re-enable it's recommended to enable access to the files # Deny access to raw php sources by default SetHandler application/x-httpd-php-source # Configure all that stuff needed for using PHP-FPM as FastCGI a2enmod actions alias fastcgi configĬreate config file for PHP-FPM and FastCGI in /etc/apache2/conf.d/php5-fpm. aptitude install apache2-mpm-worker libapache2-mod-fastcgi php5-fpm php-apcĮnable needed modules.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |