• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    FOG 1.6 working branch - fog-agent 0.1.6 enrollment returns 308 redirect

    Scheduled Pinned Locked Moved Unsolved FOG Problems
    working-1.6redirectfog-agent
    3 Posts 2 Posters 12 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Balage80
      last edited by

      Hello,

      I am running the FOG 1.6 working branch on Ubuntu with Apache.

      Current server details:

      • FOG branch: working-1.6
      • Commit: 47ea627c9
      • Database schema: 436
      • Apache: 2.4.66
      • New client: fog-agent 0.1.6 x64
      • Windows 11 clients

      The new agent is installed with this server address:

      https://192.168.1.100/fog

      fog-agent status shows:

      {
      “enrolled”: false,
      “has_key”: true,
      “host_id”: 0,
      “server”: “https://192.168.1.100/fog”
      }

      The Windows client is definitely reaching the server.

      Apache access log:

      192.168.102.20
      POST /fog/agent/v1/enroll HTTP/1.1
      308
      Go-http-client/1.1

      A manual test from the FOG server gives the same result:

      POST https://192.168.1.100/fog/agent/v1/enroll

      Response:

      HTTP/1.1 308 Permanent Redirect
      Location: https://192.168.1.100/fog/management/index.php

      I already re-ran installfog.sh successfully.

      The active Apache vhost contains:

      <Location /fog/agent/>
      SSLOptions +StdEnvVars +ExportCertData
      </Location>

      and:

      RewriteRule ^/fog/(.*)$ /fog/api/index.php [QSA,L]

      Apache is listening on 443 and apache2ctl -S shows:

      *:443 fog (/etc/apache2/sites-enabled/001-fog.conf:38)

      The issue remains after re-running the installer.

      Additional information:
      The legacy FOG Client 0.13.0 clients on the same server also recently stopped authenticating properly. They repeatedly call:

      /fog/management/index.php?sub=requestClientInfo&authorize&newService

      but do not continue normally.

      Before the recent working-1.6 updates, the legacy clients were communicating normally.

      I would prefer an upstream fix rather than manually modifying Apache or PHP files.

      Is this a known regression in the current working-1.6 branch affecting the fog-agent /agent/v1/enroll route or the API router?

      Thank you.

      Tom ElliottT 2 Replies Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @Balage80
        last edited by

        @Balage80 Can you please make sure FOG_API_ENABLED is set/ticked in your FOG UI:

        FOG Configuration -> FOG Settings -> API System -> FOG_API_ENABLED

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott @Balage80
          last edited by

          @Balage80 This is fixed in working-1.6 (PR #1755).

          The agent routes were being blocked by the FOG_API_ENABLED setting. With the API turned off, every /fog/agent/v1/ request got a 308 redirect to the login page, so the agent could never enroll. Now the agent routes work whether that setting is on or off.

          To update: pull working-1.6 and re-run installfog.sh. After that, you can turn FOG_API_ENABLED back off if you want. Enrollment still needs an approval in the UI.

          The legacy FOG Client 0.13.0 problem has a different cause. If those clients still loop on requestClientInfo after the update, please post the fog.log from one of them.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          57

          Online

          12.8k

          Users

          17.6k

          Topics

          157.1k

          Posts
          Copyright © 2012-2026 FOG Project