<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>php-fpm no extension &#8211; Scott Mcintyre</title>
	<atom:link href="https://scott.cm/tag/php-fpm-no-extension/feed/" rel="self" type="application/rss+xml" />
	<link>https://scott.cm</link>
	<description>Web Operations Engineer,  Linux Systems Administrator,  mySQL DBA,  MongoDB DBA,  Python+PHP Developer,  Performance Engineer</description>
	<lastBuildDate>Thu, 17 Jan 2013 06:14:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.2.3</generator>
	<item>
		<title>nginx rewrite PHP with no extension</title>
		<link>https://scott.cm/nginx-rewrite-php-with-no-extension/</link>
				<comments>https://scott.cm/nginx-rewrite-php-with-no-extension/#respond</comments>
				<pubDate>Thu, 17 Jan 2013 06:14:26 +0000</pubDate>
		<dc:creator><![CDATA[Scott Mcintyre]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[nginx access denied]]></category>
		<category><![CDATA[nginx rewrite no extension]]></category>
		<category><![CDATA[php no extension]]></category>
		<category><![CDATA[php-fpm limit_extensions]]></category>
		<category><![CDATA[php-fpm no extension]]></category>
		<category><![CDATA[security.limit_extensions]]></category>
		<category><![CDATA[security.limit_extensions = false]]></category>

		<guid isPermaLink="false">https://scott.cm/?p=214</guid>
				<description><![CDATA[I recently had to troubleshoot an issue while migrating from cherokee to nginx. This was a PHP application which had a shared set of common scripts , these where accessed by domain/common/file which in turn was translated into /vhosts/shared/common and this then included the necessary files. After doing the rewrite]]></description>
								<content:encoded><![CDATA[<p>I recently had to troubleshoot an issue while migrating from cherokee to nginx.    This was a PHP application which had a shared set of common scripts ,  these where accessed by domain/common/file which in turn was translated into /vhosts/shared/common and this then included the necessary files.</p>
<p>After doing the rewrite for nginx,</p>
<blockquote><p>
                location ^~ /common/ {<br />
                fastcgi_split_path_info ^(/common)(/?.+)$;<br />
                fastcgi_param SCRIPT_FILENAME /vhosts/shared/common$fastcgi_script_name;<br />
                fastcgi_param PATH_INFO $fastcgi_path_info;<br />
                fastcgi_pass   127.0.0.1:9000;<br />
                include        fastcgi_params;<br />
        }
</p></blockquote>
<p>nginx was simply returning access denied.</p>
<blockquote><p>
# curl http://localhost/common/file<br />
Access denied.
</p></blockquote>
<p>Which is because the new file has no extension and PHP-FPM now defaults to only allow .php.  This can be altered by editing security.limit_extensions in the php-fpm.conf (in this case /etc/php-fpm.d/daemon.conf) to allow the extensions you need.  In this case we needed it to support files without extensions so setting security.limit_extensions to FALSE done the job,</p>
<blockquote><p>
security.limit_extensions = FALSE
</p></blockquote>
]]></content:encoded>
							<wfw:commentRss>https://scott.cm/nginx-rewrite-php-with-no-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
