<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tinybird</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tinybird"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Tinybird"/>
	<updated>2026-04-25T18:16:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Apache_with_php-fpm&amp;diff=21464</id>
		<title>Apache with php-fpm</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Apache_with_php-fpm&amp;diff=21464"/>
		<updated>2022-01-07T16:41:36Z</updated>

		<summary type="html">&lt;p&gt;Tinybird: fix code block&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Apache and PHP===&lt;br /&gt;
PHP-FPM is the Fast Process Manager for PHP which runs as a service that spawns PHP processes as needed when files files are requested through the FastCGI interface. Passing this off to the PHP-FPM results in interpreting the PHP files much faster than having Apache spawn new processes each time a page is requested. You can read more about it [https://php-fpm.org/ here].&lt;br /&gt;
&lt;br /&gt;
===Step by Step Instructions===&lt;br /&gt;
&#039;&#039;&#039;Install packages&#039;&#039;&#039;&lt;br /&gt;
{{Cmd|apk add apache2-proxy php8-fpm}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Run and Add Services to Startup&#039;&#039;&#039;&lt;br /&gt;
{{Cmd|rc-service php-fpm8 start&lt;br /&gt;
rc-update add php-fpm8&lt;br /&gt;
rc-service apache2 start&lt;br /&gt;
rc-update add apache2}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Configure Apache&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add the following lines to /etc/apache2/httpd.conf:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;FilesMatch \.php$&amp;gt;&lt;br /&gt;
     SetHandler &amp;quot;proxy:fcgi://127.0.0.1:9000&amp;quot;&lt;br /&gt;
 &amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Configure PHP-FPM&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can edit the file /etc/php8/php-fpm.conf to suit you needs.&lt;br /&gt;
&lt;br /&gt;
In the configuration you may need to change the default user and group from nobody to another user such as apache:&lt;br /&gt;
 user = apache&lt;br /&gt;
 group = apache&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Restart apache2 and PHP-FPM&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After editing the configuration you must reload related services.&lt;br /&gt;
{{Cmd|rc-service php-fpm8 reload &amp;amp;&amp;amp; rc-service apache2 reload}}&lt;br /&gt;
&lt;br /&gt;
===More info===&lt;br /&gt;
[https://wiki.apache.org/httpd/PHP-FPM apache wiki]&lt;br /&gt;
[http://php.net/manual/en/install.fpm.configuration.php php-fpm manual]&lt;br /&gt;
[[Category:Web Server]]&lt;br /&gt;
[[Category:PHP]]&lt;/div&gt;</summary>
		<author><name>Tinybird</name></author>
	</entry>
</feed>