summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/70_mod_php.conf.in')
-rw-r--r--src/70_mod_php.conf.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/70_mod_php.conf.in b/src/70_mod_php.conf.in
new file mode 100644
index 0000000..4b97354
--- /dev/null
+++ b/src/70_mod_php.conf.in
@@ -0,0 +1,24 @@
+<IfDefine PHP>
+ # The mod_php.so symlink is controlled by
+ # eselect-php. However, the module name changed from
+ # php5_module to php7_module so we can't blindly load whatever
+ # is there. Instead we let eselect-php manage a small
+ # configuration file that loads the appropriate module.
+ Include "@localstatedir@/lib/eselect-php/mod_php.conf"
+
+ # Tell apache that mod_php should handle PHP files.
+ #
+ # NOTE: Avoiding AddHandler/AddType for security (bug
+ # #538822). Please read the related news item!
+ <FilesMatch "\.(php|php[57]|phtml)$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+
+ # PHP source files which are meant to be displayed as
+ # syntax-highlighted source code.
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+
+ DirectoryIndex index.php index.phtml
+</IfDefine>