Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 7cd2c4cae57ff59e9673f7133e3515a4 > files > 5

apache-conf-2.2.9-2.2mdv2009.0.src.rpm

# $Id: fileprotector.conf 92365 2007-09-23 14:04:27Z oden $
# $HeadURL: svn+ssh://svn.mandriva.com/svn/packages/cooker/apache-conf/current/SOURCES/fileprotector.conf $

# This protects rpm backup files from beeing served, these files could contain sensible information.
<IfModule mod_dir.c>
    <FilesMatch "\.(rpmorig|rpmsave)$">
	Order allow,deny
	Deny from all
    </FilesMatch>
</IfModule>

# This protects ssi and php files from beeing served if the module is not installed, it prevents
# presumptive source code theft.
<IfModule !mod_include.c>
    <IfModule mod_dir.c>
	<FilesMatch "\.(shtml)$">
	    ErrorDocument 403 "<h1>403 Forbidden: Execute Access Forbidden</h1><p>The server \
	    is currently not serving ssi scripts.</p><p>This could mean the server administrator \
	    is doing maintenance or has orphan ssi files laying around, please contact the server \
	    administrator or come back later. Thank you.</p>
	    Order allow,deny
	    Deny from all
	</FilesMatch>
    </IfModule>
</IfModule>

<IfDefine !HAVE_PHP5>
<IfDefine HAVE_PHP4>
    <IfModule !mod_php4.c>
	<IfModule mod_dir.c>
	    <FilesMatch "\.(php|php3|php4|php5|phps|phtml)$">
		ErrorDocument 403 "<h1>403 Forbidden: Execute Access Forbidden</h1><p>The server \
		is currently not serving php4 scripts.</p><p>This could mean the server administrator \
		is doing maintenance or has orphan php files laying around, please contact the server \
		administrator or come back later. Thank you.</p>
		Order allow,deny
		Deny from all
	    </FilesMatch>
	</IfModule>
    </IfModule>
</IfDefine>
</IfDefine>

<IfDefine !HAVE_PHP4>
<IfDefine HAVE_PHP5>
    <IfModule !mod_php5.c>
	<IfModule mod_dir.c>
	    <FilesMatch "\.(php|php3|php4|php5|phps|phtml)$">
		ErrorDocument 403 "<h1>403 Forbidden: Execute Access Forbidden</h1><p>The server \
		is currently not serving php5 scripts.</p><p>This could mean the server administrator \
		is doing maintenance or has orphan php files laying around, please contact the server \
		administrator or come back later. Thank you.</p>
		Order allow,deny
		Deny from all
	    </FilesMatch>
	</IfModule>
    </IfModule>
</IfDefine>
</IfDefine>