|
14 | 14 | [Installing Apache modules]: #installing-apache-modules |
15 | 15 | [Installing arbitrary modules]: #installing-arbitrary-modules |
16 | 16 | [Installing specific modules]: #installing-specific-modules |
17 | | -[Configuring FastCGI servers]: #configuring-fastcgi-servers-to-handle-php-files |
18 | 17 | [Load balancing examples]: #load-balancing-examples |
19 | 18 | [apache affects]: #what-the-apache-module-affects |
20 | 19 |
|
|
34 | 33 | [`apache_version`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apache_version |
35 | 34 | [`apache::balancer`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachebalancer |
36 | 35 | [`apache::balancermember`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachebalancermember |
37 | | -[`apache::fastcgi::server`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachefastcgiserver |
38 | 36 | [`apache::mod`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemod |
39 | 37 | [`apache::mod::<MODULE NAME>`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#public-classes |
40 | 38 | [`apache::mod::alias`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodalias |
|
110 | 108 | [`ExtendedStatus`]: https://httpd.apache.org/docs/current/mod/core.html#extendedstatus |
111 | 109 |
|
112 | 110 | [Facter]: http://docs.puppet.com/facter/ |
113 | | -[FastCGI]: https://fast-cgi.github.io/ |
114 | 111 | [FallbackResource]: https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource |
115 | 112 | [`fallbackresource`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#fallbackresource |
116 | 113 | [`FileETag`]: https://httpd.apache.org/docs/current/mod/core.html#fileetag |
|
272 | 269 | - [Beginning with Apache - Installation][Beginning with Apache] |
273 | 270 | 3. [Usage - The classes and defined types available for configuration][Usage] |
274 | 271 | - [Configuring virtual hosts - Examples to help get started][Configuring virtual hosts] |
275 | | - - [Configuring FastCGI servers to handle PHP files][Configuring FastCGI servers] |
276 | 272 | - [Load balancing with exported and non-exported resources][Load balancing examples] |
277 | 273 | 4. [Reference - An under-the-hood peek at what the module is doing and how][Reference] |
278 | 274 | 5. [Limitations - OS compatibility, etc.][Limitations] |
@@ -676,54 +672,6 @@ apache::mod { 'mod_authnz_external': } |
676 | 672 |
|
677 | 673 | There are several optional parameters you can specify when defining Apache modules this way. See the [defined type's reference][`apache::mod`] for details. |
678 | 674 |
|
679 | | -<a id="configuring-fastcgi-servers-to-handle-php-files"></a> |
680 | | -### Configuring FastCGI servers to handle PHP files |
681 | | - |
682 | | -#### FastCGI on Ubuntu 18.04 |
683 | | - |
684 | | -On Ubuntu 18.04, `mod_fastcgi` is no longer supported. So considering: |
685 | | - |
686 | | -* an Apache Vhost with docroot set to `/var/www/html` |
687 | | -* a FastCGI server listening on `127.0.0.1:9000` |
688 | | - |
689 | | -you can then use the [`custom_fragment`][] parameter to configure the virtual host to have the FastCGI server handle the specified file type: |
690 | | - |
691 | | -``` puppet |
692 | | -apache::vhost { 'www': |
693 | | - ... |
694 | | - docroot => '/var/www/html/', |
695 | | - custom_fragment => 'ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/$1', |
696 | | - ... |
697 | | -} |
698 | | -``` |
699 | | - |
700 | | -Please note you have to adjust the second ProxyPassMatch parameter to your docroot value (here `/var/www/html/`). |
701 | | - |
702 | | -#### Other OSes |
703 | | - |
704 | | -Add the [`apache::fastcgi::server`][] defined type to allow [FastCGI][] servers to handle requests for specific files. For example, the following defines a FastCGI server at 127.0.0.1 (localhost) on port 9000 to handle PHP requests: |
705 | | - |
706 | | -``` puppet |
707 | | -apache::fastcgi::server { 'php': |
708 | | - host => '127.0.0.1:9000', |
709 | | - timeout => 15, |
710 | | - flush => false, |
711 | | - faux_path => '/var/www/php.fcgi', |
712 | | - fcgi_alias => '/php.fcgi', |
713 | | - file_type => 'application/x-httpd-php' |
714 | | -} |
715 | | -``` |
716 | | - |
717 | | -You can then use the [`custom_fragment`][] parameter to configure the virtual host to have the FastCGI server handle the specified file type: |
718 | | - |
719 | | -``` puppet |
720 | | -apache::vhost { 'www': |
721 | | - ... |
722 | | - custom_fragment => 'AddType application/x-httpd-php .php' |
723 | | - ... |
724 | | -} |
725 | | -``` |
726 | | - |
727 | 675 | <a id="load-balancing-examples"></a> |
728 | 676 | ### Load balancing examples |
729 | 677 |
|
|
0 commit comments