<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[the API return 404 (or 501&#x2F;302 when using &#x2F;api&#x2F;index.php?)]]></title><description><![CDATA[<p dir="auto">I’m sorry for the double-posting, but after submitting my issue on github (<a href="https://github.com/FOGProject/fogproject/issues/263" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/FOGProject/fogproject/issues/263</a>) I realized that it could have been a technical issue (even though, the installation of both, system + FOG is brand new).</p>
<p dir="auto">Basically, the API doesn’t seems to works correctly, the log are on the github, for for better reading/following, here is a copy/paste of my issue :</p>
<hr />
<p dir="auto">Hi there,</p>
<p dir="auto">I’m currently unable to use the API as I constantly got either a 404 or 501/302 (using for instance, this command) :</p>
<pre><code>$ curl -H "fog-api-token: MjUwYjkxNGU4YTJkNjM3MDliNmVlZDFjZGE5YjcwNjg2N2Y1ZWE1NjMxMzFkZTk4Y2ZhOWZjNGJjZDUyZGIxNTljODg0NDhiM2RlODBmMzc5ZWFkMTkxxxxx1NDU5OTZhMzIwODJmYThiNWI0MzhhYjkwMDZhNzQ1MTFiNjg" -H "fog-user-token: NTQ5MWJiMjgxNmI5OTcyZDM5OTMzMWJlZjlkZWM4Y2M2MDg0ZTI5MTQ5MGZlYzdkNmYzY2NjNTc1OGE1ZGE3ODY4NDlkOWU4NjFiMzdmOTU5MDxxxN2NjNDQxYjhlMWI3MjYxZDMxZmRkZmNkY2M1Mjk4ZGNmZGUzMzNiNWY" -X GET http://192.168.6.128/fog/system/info

&lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&gt;
&lt;html&gt;&lt;head&gt;
&lt;title&gt;404 Not Found&lt;/title&gt;
&lt;/head&gt;&lt;body&gt;
&lt;h1&gt;Not Found&lt;/h1&gt;
&lt;p&gt;The requested URL /fog/system/info was not found on this server.&lt;/p&gt;
&lt;hr&gt;
&lt;address&gt;Apache/2.4.34 (Ubuntu) Server at 192.168.6.128 Port 80&lt;/address&gt;
&lt;/body&gt;&lt;/html&gt;
</code></pre>
<p dir="auto">from apache “acces.log” ;</p>
<pre><code>"GET /fog/system/info HTTP/1.1" 404 453 "-" "curl/7.58.0"
</code></pre>
<p dir="auto">Using /api/index.php?system/info gave me a 501 :</p>
<pre><code>$ curl -H "fog-api-token: MjUwYjkxNGU4YTJkNjM3MDliNmVlZDFjZGE5YjcwNjg2N2Y1ZWE1NjMxMzFkZTk4Y2ZhOWZjNGJjZDUyZGIxNTljODg0NDhiM2RlODBmMzc5ZWFkMTkxxxxx1NDU5OTZhMzIwODJmYThiNWI0MzhhYjkwMDZhNzQ1MTFiNjg" -H "fog-user-token: NTQ5MWJiMjgxNmI5OTcyZDM5OTMzMWJlZjlkZWM4Y2M2MDg0ZTI5MTQ5MGZlYzdkNmYzY2NjNTc1OGE1ZGE3ODY4NDlkOWU4NjFiMzdmOTU5MDxxxN2NjNDQxYjhlMWI3MjYxZDMxZmRkZmNkY2M1Mjk4ZGNmZGUzMzNiNWY" -X GET http://192.168.6.128/fog/api/index.php?system/info
</code></pre>
<p dir="auto">Related access.log entry:</p>
<pre><code>"GET /fog/api/index.php?system/info HTTP/1.1" 501 678 "-" "curl/7.58.0"
</code></pre>
<p dir="auto">FYI; here is my (untouched) /etc/apache2/sites-enabled/001-fog.conf:</p>
<pre><code>&lt;VirtualHost *:80&gt;
    &lt;FilesMatch "\.php$"&gt;
        SetHandler "proxy:fcgi://127.0.0.1:9000/"
    &lt;/FilesMatch&gt;
    KeepAlive Off
    ServerName 192.168.2.1
    DocumentRoot /var/www/
    &lt;Directory /var/www/fog/&gt;
        DirectoryIndex index.php index.html index.htm
    &lt;/Directory&gt;
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d
    RewriteRule ^/fog/(.*)$ /fog/api/index.php [QSA,L]
&lt;/VirtualHost&gt;
</code></pre>
<h2>Could you please let me know what else should I check as there is no logs on /opt/fog/log/* related to the API.</h2>
]]></description><link>http://forums.fogproject.org/topic/12456/the-api-return-404-or-501-302-when-using-api-index-php</link><generator>RSS for Node</generator><lastBuildDate>Sun, 07 Jun 2026 02:39:40 GMT</lastBuildDate><atom:link href="http://forums.fogproject.org/topic/12456.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Sep 2018 12:58:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to the API return 404 (or 501&#x2F;302 when using &#x2F;api&#x2F;index.php?) on Sun, 28 Oct 2018 13:42:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/41811">@Nono</a> Marking this solved as well now as I finally found the root cause of it and added a fix to the installer (<a href="https://github.com/FOGProject/fogproject/issues/263#issuecomment-433706206" target="_blank" rel="noopener noreferrer nofollow ugc">ref</a>).</p>
]]></description><link>http://forums.fogproject.org/post/117611</link><guid isPermaLink="true">http://forums.fogproject.org/post/117611</guid><dc:creator><![CDATA[Sebastian Roth]]></dc:creator><pubDate>Sun, 28 Oct 2018 13:42:10 GMT</pubDate></item><item><title><![CDATA[Reply to the API return 404 (or 501&#x2F;302 when using &#x2F;api&#x2F;index.php?) on Mon, 24 Sep 2018 09:03:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/28061">@Sebastian-Roth</a> said in <a href="/post/116620">the API return 404 (or 501/302 when using /api/index.php?)</a>:</p>
<blockquote>
<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/41811">@Nono</a> Sorry for the very long delay. Took me a while to find the time to look into this and figure it out. Seems like the default site apache config is somehow overwriting our 001-fog.conf and therefore the rewrite rules don’t kick in. Not sure if this is just on Ubuntu. Don’t have the time to try other distros as well but for now I assume this is specific for Ubuntu. Run this to fix the issue for now:</p>
<pre><code>a2dissite 000-default.conf
service apache2 restart
</code></pre>
</blockquote>
<p dir="auto">Thanks <a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/28061">@Sebastian-Roth</a>,</p>
<p dir="auto">Expect the “apache2” instead of “apache”, it works much better !<br />
I’m going to update the github case as well.</p>
]]></description><link>http://forums.fogproject.org/post/116625</link><guid isPermaLink="true">http://forums.fogproject.org/post/116625</guid><dc:creator><![CDATA[Nono]]></dc:creator><pubDate>Mon, 24 Sep 2018 09:03:09 GMT</pubDate></item><item><title><![CDATA[Reply to the API return 404 (or 501&#x2F;302 when using &#x2F;api&#x2F;index.php?) on Sun, 23 Sep 2018 06:45:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/41811">@Nono</a> Sorry for the very long delay. Took me a while to find the time to look into this and figure it out. Seems like the default site apache config is somehow overwriting our 001-fog.conf and therefore the rewrite rules don’t kick in. Not sure if this is just on Ubuntu. Don’t have the time to try other distros as well but for now I assume this is specific for Ubuntu. Run this to fix the issue for now:</p>
<pre><code>a2dissite 000-default.conf
service apache restart
</code></pre>
]]></description><link>http://forums.fogproject.org/post/116620</link><guid isPermaLink="true">http://forums.fogproject.org/post/116620</guid><dc:creator><![CDATA[Sebastian Roth]]></dc:creator><pubDate>Sun, 23 Sep 2018 06:45:25 GMT</pubDate></item><item><title><![CDATA[Reply to the API return 404 (or 501&#x2F;302 when using &#x2F;api&#x2F;index.php?) on Mon, 17 Sep 2018 08:38:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/7217">@Tom-Elliott</a> ,</p>
<p dir="auto">I tried to disable / enable again : No luck<br />
I tried to reset both token : No luck.</p>
<p dir="auto">Any idea ?</p>
]]></description><link>http://forums.fogproject.org/post/116447</link><guid isPermaLink="true">http://forums.fogproject.org/post/116447</guid><dc:creator><![CDATA[Nono]]></dc:creator><pubDate>Mon, 17 Sep 2018 08:38:57 GMT</pubDate></item><item><title><![CDATA[Reply to the API return 404 (or 501&#x2F;302 when using &#x2F;api&#x2F;index.php?) on Thu, 13 Sep 2018 06:56:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/7217">@Tom-Elliott</a>,</p>
<p dir="auto">As far as I can see, everything looks normal/Activated :<br />
<img src="/assets/uploads/files/1536821674534-ed235326-0678-47c1-b8a3-29cbe10a993d-image-resized.png" alt="0_1536821674752_ed235326-0678-47c1-b8a3-29cbe10a993d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1536821760156-79d03fa8-c4c2-4ae6-91c7-46ff52cd8e3b-image-resized.png" alt="0_1536821759911_79d03fa8-c4c2-4ae6-91c7-46ff52cd8e3b-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>http://forums.fogproject.org/post/116361</link><guid isPermaLink="true">http://forums.fogproject.org/post/116361</guid><dc:creator><![CDATA[Nono]]></dc:creator><pubDate>Thu, 13 Sep 2018 06:56:10 GMT</pubDate></item><item><title><![CDATA[Reply to the API return 404 (or 501&#x2F;302 when using &#x2F;api&#x2F;index.php?) on Wed, 12 Sep 2018 14:10:22 GMT]]></title><description><![CDATA[<p dir="auto">Please check fog settings for fog_api_enabled</p>
<p dir="auto">I believe it is defaulted to disabled to ensure some small level of safety, as the default user/password is well known.</p>
]]></description><link>http://forums.fogproject.org/post/116342</link><guid isPermaLink="true">http://forums.fogproject.org/post/116342</guid><dc:creator><![CDATA[Tom Elliott]]></dc:creator><pubDate>Wed, 12 Sep 2018 14:10:22 GMT</pubDate></item></channel></rss>