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

    Get webdestdir and symlink right or even rid of the later

    Scheduled Pinned Locked Moved
    Feature Request
    4
    11
    754
    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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by Wayne Workman

      What problems could there be if a system has an old fog version in an old directory?

      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!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

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

        The reason Debian and Ubuntu get a symlink into /var/www/html/fog is for the same exact reason as old installs having been upgraded. The older may have only been /var/www/fog but with an upgrade.

        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
        • S
          Sebastian Roth Moderator
          last edited by

          @Tom-Elliott I don’t get what you mean. Could explain it a different way?

          @Wayne-Workman On daily life it’s not making much of a difference but if you do a manual kernel update or things like that you can run into an issue easily.

          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

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

            @Sebastian-Roth the red hat method has always done /var/www/html/fog

            So the folder always is there. For some semblance of similarity between red hat and Debian, on red hat I create a symlink from /var/www/html/fog to /var/www/fog

            On Debian based, up to around 1.3.x the web instal was set to /var/www/fog.

            When Debian moved to using html, subsequent fog updates needed to go to the new location as well.

            To ease the process, we still put the main data at /var/www/fog and created a symlink into /var/www/html/fog.

            So Debian based usually just get put in /var/www and red hat gets put in /var/www/html. The. I put a symlink where needed to make getting to them in either place on any OS similar.

            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

            george1421G 1 Reply Last reply Reply Quote 1
            • Wayne WorkmanW
              Wayne Workman
              last edited by

              So, how would one manually check for this problem? Simply looking in these two spots? Is that it?

              • /var/www/fog/lib/fog/system.class.php
              • /var/www/html/fog/lib/fog/system.class.php

              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!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @Tom Elliott
                last edited by george1421

                @Tom-Elliott said in Get webdestdir and symlink right or even rid of the later:

                So Debian based usually just get put in /var/www and red hat gets put in /var/www/html. The. I put a symlink where needed to make getting to them in either place on any OS similar.

                From a support standpoint, we really need one path to give to the user for debugging purposes. It would be too much to say if you have OS W use this path and OS Z use this path. Another option would be to move the FOG web ui code out of the docbase directory altogether much like xibo does.

                Xibo places its php code in /opt/xibo-cms, then drops this file into the Apache’s conf.d directory.

                ]# cat xibo.conf
                Alias /xibo "/opt/xibo-cms/web"
                
                <Directory "/opt/xibo-cms/web">
                    AllowOverride All
                    Options Indexes FollowSymLinks MultiViews
                    Order allow,deny
                    Allow from all
                    Require all granted
                </Directory>
                

                Of course for selinux this directory and its files needs to be tagged correctly. But its an option.

                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!

                1 Reply Last reply Reply Quote 1
                • Wayne WorkmanW
                  Wayne Workman
                  last edited by Wayne Workman

                  The new external reporting server-side also runs it’s API out of /opt. Link here. This is a snippit of the conf file:

                  <VirtualHost *:443>
                      ServerName fog-external-reporting-entries.theworkmans.us
                      WSGIScriptAlias / /opt/external_reporting/wsgi.py
                      <Directory /opt/external_reporting>
                          Require all granted
                          AllowOverride None
                          Options None
                          Order deny,allow
                          Allow from all
                      </Directory>
                  </VirtualHost>
                  

                  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!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @george1421 @Wayne-Workman Sure moving the web UI to a new standard location would be an option but I would not so this without a really good reason and I don’t see that here.

                    As mentioned Debian, Ubuntu, CentOS and RHEL use /var/www/html as docroot since some years and I have used that when posting in the forums and such for all that time now. All that would be wrong if we switch to /opt now.

                    Right, detecting the issue should be as simple as running diff on those system.class.php files or even more save diff the whole directories. Should be fairly quick and return empty if there link is fine.

                    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 1
                    • Wayne WorkmanW
                      Wayne Workman
                      last edited by

                      There are these two variables within fogsettings:

                      docroot='/var/www/html/'
                      webroot='/fog/'
                      

                      Why not respect them?
                      Whatever docroot is set to, touch only that and stop touching other web directories period.

                      Because what business does the installer have making symlinks in directories that are not defined within /opt/fog/.fogsettings?

                      Also, I think the fog reporting should source the /opt/fog/.fogsettings file and use something like this to determine the correct file to get the version from:

                      source /opt/fog/.fogsettings
                      config_file=${docroot}/${webroot}/lib/fog/system.class.php
                      fog_version=$(cat ${config_file} | grep FOG_VERSION | cut -d',' -f2 | cut -d"'" -f2)
                      

                      Concerning systems out there with the old web directories, I really don’t see an issue with just leaving it as-is. I know @Sebastian-Roth said it could be problematic when manually updating kernels - but the web UI has a kernel update feature, and anyone digging into the docroot guts probably can figure this stuff out for themselves or come here and ask for help.

                      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!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      1 Reply Last reply Reply Quote 0
                      • Wayne WorkmanW
                        Wayne Workman
                        last edited by Wayne Workman

                        https://github.com/FOGProject/fogproject/pull/409/files
                        https://github.com/FOGProject/fogproject/pull/410/files

                        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!
                        Daily Clean Installation Results:
                        https://fogtesting.fogproject.us/
                        FOG Reporting:
                        https://fog-external-reporting-results.fogproject.us/

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

                        153

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project