SOLVED https/SSL issues help. :)

  • Hello! I used to have this setup in my 001-fog.conf to have Https (code below). after updating to 1.5.3 it dissapeared so i added it again and restarted apache. but still get a HTTP ERROR 500.

    Have I been doing this wrong all the time even tho it worked?
    it still works by using the ip/fog in the browser.

    Suggestions or pointing me in the right direction greatly appreciated.

    <VirtualHost *:80>
       Redirect /
    <VirtualHost *:443>
        <FilesMatch "\.php$">
            SetHandler "proxy:fcgi://"
        KeepAlive Off
        DocumentRoot /var/www/fog
        SSLEngine on
        SSLCertificateFile /etc/apache2/SSL/fog/server.crt
        SSLCertificateKeyFile /etc/apache2/SSL/fog/server.key
        SSLCertificateChainFile //etc/apache2/SSL/fog/fromGodaddy.crt
        <Directory /var/www/html/fog/>
            DirectoryIndex index.php index.html index.htm
        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]

  • BTW you can mark it as solved. Got it up and running from the info you guys gave me thank you!

  • @tom-elliott I was thinking about doing it. But i’m afraid it would ruin all the computers with the clients since they where installed with the IP address. Maybe this is not the case if I use FQDN instead?

  • @ek_n you can set the fogsettings file ip variable to that of the hostname

  • OK so I reverted back to http and it’s back to normal.

    and it’s working again. I assume that since it was trying to boot https: with the IP. and the certificate had a hostname it wouldn’t accept it because it would show as invalid certificate?

  • @ek_n I spoke too soon this is what I get when i try to network boot a machine.

    t… ok … Permission denied (
    could not boot:Permission denied (
    chainloading dailed. hit ‘s’ for the ipxe shell;

  • @tom-elliott Nevermind. DocumentRoot /var/www/fog worked as default. Thank you for all your time and help! 🙂

  • @tom-elliott Thank you everything is running as normal. Just one more question. Documentroot should be this right DocumentRoot /var/www/fog ?

  • @ek_n when you run the installer please before hand run:

    sudo mv /var/www/fog{,_back}
    sudo mv /var/www/html/fog{,_back}

  • @tom-elliott

    Ok, thank you I will try that unless @Sebastian-Roth has some input about the error log.

  • @sebastian-roth

    [Thu May 31 08:39:36.763081 2018] [proxy_fcgi:error] [pid 25919] [client 10.101.xx.xx:54901] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /var/www/fog/common$
    [Thu May 31 08:39:37.659072 2018] [proxy_fcgi:error] [pid 25919] [client 10.101.x.xx:54903] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /var/www/fog/common$```

  • For what it’s worth, you can pass the arguments that will take care of the configuration for you too.

    From what I’m reading on your layout, you would do something like:

    ./ --force-https -y

    This would build a 001-fog.conf that will force redirecting to HTTPS. From there, you would modify the 001-fog.conf file to change your SSLCertificate{....}File lines to your relevant layout.

    After that, you could edit the /opt/fog/.fogsettings file and add the line: novhost="y" to the end. Save the file and upgrades should no longer overwrite the 001-fog.conf file, and you should have a working configuration.

    Of course, as @Sebastian-Roth suggest, please post the contents of your apache error logs.

  • Moderator

    @ek_N Take a look at your apache error logs (see my signature) and post here what errors you have in there.