35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
# This file replaces old system MIME types and sets them only in the
|
|
# Apache webserver
|
|
|
|
# Using (?:pattern) instead of (pattern) is a small optimization that
|
|
# avoid capturing the matching pattern (as $1) which isn't used here
|
|
# application/x-httpd-php phtml php
|
|
<FilesMatch ".+\.ph(?:ar|p|tml)$">
|
|
SetHandler application/x-httpd-php
|
|
</FilesMatch>
|
|
# application/x-httpd-php-source phps
|
|
<FilesMatch ".+\.phps$">
|
|
SetHandler application/x-httpd-php-source
|
|
# Deny access to raw php sources by default
|
|
# To re-enable it's recommended to enable access to the files
|
|
# only in specific virtual host or directory
|
|
Require all denied
|
|
</FilesMatch>
|
|
# Deny access to files without filename (e.g. '.php')
|
|
<FilesMatch "^\.ph(?:ar|p|ps|tml)$">
|
|
Require all denied
|
|
</FilesMatch>
|
|
|
|
# To enable PHP CGI site-wide, just uncomment following lines, however
|
|
# as a security measure, it's recommended to enable PHP just in the
|
|
# specific virtual servers or just specific directories
|
|
|
|
#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
|
#<Directory "/usr/lib/cgi-bin">
|
|
# AllowOverride None
|
|
# Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
|
# Order allow,deny
|
|
# Allow from all
|
|
#</Directory>
|
|
#Action application/x-httpd-php /cgi-bin/php8.3
|