I’m sorry for the double-posting, but after submitting my issue on github (https://github.com/FOGProject/fogproject/issues/263) I realized that it could have been a technical issue (even though, the installation of both, system + FOG is brand new).
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 :
Hi there,
I’m currently unable to use the API as I constantly got either a 404 or 501/302 (using for instance, this command) :
$ curl -H "fog-api-token: MjUwYjkxNGU4YTJkNjM3MDliNmVlZDFjZGE5YjcwNjg2N2Y1ZWE1NjMxMzFkZTk4Y2ZhOWZjNGJjZDUyZGIxNTljODg0NDhiM2RlODBmMzc5ZWFkMTkxxxxx1NDU5OTZhMzIwODJmYThiNWI0MzhhYjkwMDZhNzQ1MTFiNjg" -H "fog-user-token: NTQ5MWJiMjgxNmI5OTcyZDM5OTMzMWJlZjlkZWM4Y2M2MDg0ZTI5MTQ5MGZlYzdkNmYzY2NjNTc1OGE1ZGE3ODY4NDlkOWU4NjFiMzdmOTU5MDxxxN2NjNDQxYjhlMWI3MjYxZDMxZmRkZmNkY2M1Mjk4ZGNmZGUzMzNiNWY" -X GET http://192.168.6.128/fog/system/info
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /fog/system/info was not found on this server.</p>
<hr>
<address>Apache/2.4.34 (Ubuntu) Server at 192.168.6.128 Port 80</address>
</body></html>
from apache “acces.log” ;
"GET /fog/system/info HTTP/1.1" 404 453 "-" "curl/7.58.0"
Using /api/index.php?system/info gave me a 501 :
$ curl -H "fog-api-token: MjUwYjkxNGU4YTJkNjM3MDliNmVlZDFjZGE5YjcwNjg2N2Y1ZWE1NjMxMzFkZTk4Y2ZhOWZjNGJjZDUyZGIxNTljODg0NDhiM2RlODBmMzc5ZWFkMTkxxxxx1NDU5OTZhMzIwODJmYThiNWI0MzhhYjkwMDZhNzQ1MTFiNjg" -H "fog-user-token: NTQ5MWJiMjgxNmI5OTcyZDM5OTMzMWJlZjlkZWM4Y2M2MDg0ZTI5MTQ5MGZlYzdkNmYzY2NjNTc1OGE1ZGE3ODY4NDlkOWU4NjFiMzdmOTU5MDxxxN2NjNDQxYjhlMWI3MjYxZDMxZmRkZmNkY2M1Mjk4ZGNmZGUzMzNiNWY" -X GET http://192.168.6.128/fog/api/index.php?system/info
Related access.log entry:
"GET /fog/api/index.php?system/info HTTP/1.1" 501 678 "-" "curl/7.58.0"
FYI; here is my (untouched) /etc/apache2/sites-enabled/001-fog.conf:
<VirtualHost *:80>
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://127.0.0.1:9000/"
</FilesMatch>
KeepAlive Off
ServerName 192.168.2.1
DocumentRoot /var/www/
<Directory /var/www/fog/>
DirectoryIndex index.php index.html index.htm
</Directory>
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]
</VirtualHost>
Could you please let me know what else should I check as there is no logs on /opt/fog/log/* related to the API.