<?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>greader.php API相关文章列表 | 皇家元林</title>
	<atom:link href="https://hjyl.org/tags/greader-php-api/feed/" rel="self" type="application/rss+xml" />
	<link>https://hjyl.org</link>
	<description>刘元林的个人博客</description>
	<lastBuildDate>Sun, 17 Sep 2023 14:31:27 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://img.hjyl.org/uploads/2019/10/cropped-about-me-32x32.png</url>
	<title>greader.php API相关文章列表 | 皇家元林</title>
	<link>https://hjyl.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>FreshRSS Google Reader API configuration test:FAIL: HTTP error 404 Not Found</title>
		<link>https://hjyl.org/freshrss-google-reader-api-error-404/</link>
					<comments>https://hjyl.org/freshrss-google-reader-api-error-404/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Sun, 17 Sep 2023 14:31:24 +0000</pubDate>
				<category><![CDATA[元林手札]]></category>
		<category><![CDATA[404 Not Found]]></category>
		<category><![CDATA[fileinfo库]]></category>
		<category><![CDATA[FreshRSS]]></category>
		<category><![CDATA[Google Reader API]]></category>
		<category><![CDATA[greader.php API]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[RSS订阅]]></category>
		<category><![CDATA[宝塔]]></category>
		<guid isPermaLink="false">https://hjyl.org/?p=4642</guid>

					<description><![CDATA[军哥的LNMP在PHP的扩展fileinfo 库配置文件的设置上有个问题，导致FreshRSS Google  [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>军哥的LNMP在PHP的扩展fileinfo 库配置文件的设置上有个问题，导致FreshRSS Google Reader API check compatibility 显示404错误，这个错误导致在一些RSS订阅的app无法使用greader.php API。</p>



<p>FreshRSS在github issues上也有人遇到类似的问题，但是他们的方法我这边不适用。</p>



<figure class="wp-block-image size-full"><a href="https://img.hjyl.org/uploads/2023/09/20230917214658.jpg"><img fetchpriority="high" decoding="async" width="568" height="543" src="https://img.hjyl.org/uploads/2023/09/20230917214658.jpg"  class="wp-image-4643" title="20230917214658.jpg" alt="20230917214658.jpg" /></a><figcaption class="wp-element-caption">Google Reader API configuration test:FAIL: HTTP error 404 Not Found</figcaption></figure>



<p>比较了一下LNMP与宝塔lnmp的设置，发现在fileinfo 库的配置文件上有些不同，宝塔安装freshrss就没有上图问题。所以我们如此操作一下：</p>



<pre class="wp-block-code"><code>#备份pathinfo.conf文件，以防万一宝塔的代码有问题，还能恢复回来
cp /usr/local/nginx/conf/pathinfo.conf /usr/local/nginx/conf/pathinfo.conf.bak

vi /usr/local/nginx/conf/pathinfo.conf
#按“i”键进入编辑状态，将里面的内容全部删除，然后贴上下面的代码，此代码来自宝塔/www/server/nginx/conf/pathinfo.conf

set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
		set $real_script_name $1;
		set $path_info $2;
 }
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;

#按“ESC”，键入“:wq”保存！然后编辑enable-php.conf。

vi /usr/local/nginx/conf/enable-php.conf
#加入include pathinfo.conf;

        location ~ &#91;^/]\.php(/|$)
        {
            try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            include pathinfo.conf; #新增部分
        }</code></pre>



<pre class="wp-block-code"><code>nginx -s reload   #重新加载nginx</code></pre>



<figure class="wp-block-image size-full"><a href="https://img.hjyl.org/uploads/2023/09/20230917222157.jpg"><img decoding="async" width="440" height="351" src="https://img.hjyl.org/uploads/2023/09/20230917222157.jpg"  class="wp-image-4644" title="20230917222157.jpg" alt="20230917222157.jpg" /></a><figcaption class="wp-element-caption">Google Reader API configuration test PASS</figcaption></figure>



<p>—— 完 ——</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br>本文链接: <a rel="bookmark" title="FreshRSS Google Reader API configuration test:FAIL: HTTP error 404 Not Found" href="https://hjyl.org/freshrss-google-reader-api-error-404/">FreshRSS Google Reader API configuration test:FAIL: HTTP error 404 Not Found</a></span></div>]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/freshrss-google-reader-api-error-404/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
