Updating certs -dont understand new layout

Hello I went to renew the certs on several websites
www.energygateways.com, rogerwoolger.org, regresondmp.com and the CertSage page but this is different to the last time I updated. I do not know what code i need to put in, and what is the environment box for. can you forward any instructions for this to gain new certificates. thanks

3 Likes

Hi again :slightly_smiling_face:

That version of CertSage is rather old. The staging environment is used for testing your CertSage installation to be sure it can correctly communicate with Let's Encrypt. By using the staging environment to test, you avoid the much stricter limits of the production environment should you encounter an issue that requires retesting to confirm resolution.

You should update to the latest version of CertSage, which is much easier to use and has much more detailed instructions:

6 Likes

Hi thanks for the information. I have uploaded the new version into the public_hmtl of the website rogerwoolger,org (I can send you a screen shot) but not sure how to find the password. you mention ' Your password can be found in the password.txt file in your CertSage directory, which by default is located in the parent directory of the directory where you installed CertSage. The CertSage directory and password.txt are created automatically by CertSage when you visit the CertSage page in your browser. I apologise but I can not find where this is? and when I put the rogerwoolger.org/certsage.php into my browser the old version appear 1.2.0 not sure what I am doing wrong ?

3 Likes

Remember that you need to install certsage.php into the content directory of each website. Make certain to modify the $dataDirectory variable on line 18 of each copy of certsage.php to ensure that they all point to a CertSage directory that's not accessible from the public internet. Once you visit certsage.php using a browser, you'll find password.txt in your CertSage data directory.

  • If a website's content is located in public_html/, you will want to use ../CertSage as the $dataDirectory for that website's copy of certsage.php.
  • If a website's content is located in public_html/yourwebsite.whatever/, you will want to use ../../CertSage as the $dataDirectory for that website's copy of certsage.php.
3 Likes

Hi would it be possible to have screen shots or images to follow a step by step instructions. I have gone into the certsage.php which I presume is the following -
private $password;
private $accountKey;
private $accountUrl;
private $thumbprint;
private $nonce;
private $acmeDirectory;
private $responses;

private function createDirectory($directoryPath, $permissions)
{
clearstatcache(true, $directoryPath);

if (file_exists($directoryPath))
  return;

if (!mkdir($directoryPath, $permissions))
  throw new Exception("could not create directory: $directoryPath");

What to I do next and what wording do I need to alter and replace with what wording exactly? or I can take screen shots and forward them to you. I am not a techy person just a lay person trying to do this. many thanks juanita

2 Likes

It's this line near the very top of certsage.php (on the 18th line of the file):

public $dataDirectory = "../CertSage";

If a website's content is located in public_html/ then line 18 of that website's copy of certsage.php should be:

public $dataDirectory = "../CertSage";

If a website's content is located in public_html/somedomainname.whatever/ then line 18 of that website's copy of certsage.php should be:

public $dataDirectory = "../../CertSage";

The idea here is that the .. means "go up a directory" or "go to the parent directory". Thus, the deeper the content is in the directory structure, the further up CertSage needs to walk to get to your "home" directory. Simply put, the CertSage directory and your public_html directory should be "next to each other" inside the same parent directory. This keeps the CertSage directory from being under the public_html directory, which would expose its contents to the public internet.

3 Likes

Hi thanks.
I have looked in the cpanl then file manager and there is a list and then the heading
Public_html under this are my various websites & domains listed which I will also need to update.
Then rogerwoolger.com website under this is
.sys
.well-known

  • Certsage
    it is in this folder that the certsage.php is located is this the wrong place as
    again in my browser rogerwoolger.org/certsage.php brings up the old vers 1.2.0.
    I then checked the code for line 18 but not sure how to count this.

can you hightlight in the following which bit?
class CertSage
{
public $version = "1.4.0";
public $dataDirectory = "../CertSage";

private $password;
private $accountKey;
private $accountUrl;
private $thumbprint;
private $nonce;
private $acmeDirectory;
private $responses;

private function createDirectory($directoryPath, $permissions)
{
clearstatcache(true, $directoryPath);

if (file_exists($directoryPath))
  return;

if (!mkdir($directoryPath, $permissions))
  throw new Exception("could not create directory: $directoryPath");

}

private function readFile($filePath)
{
clearstatcache(true, $filePath);

if (!file_exists($filePath))
  return null;

$string = file_get_contents($filePath);

if ($string === false)
  throw new Exception("could not read file: $filePath");

return $string;

}

private function writeFile($filePath, $string, $permissions)
{
if (file_put_contents($filePath, $string, LOCK_EX) === false)
throw new Exception("could not write file: $filePath");

if (!chmod($filePath, $permissions))
  throw new Exception("could not set permissions for file: $filePath");

}
thanks

3 Likes

There's nothing to count. :slightly_smiling_face: I listed the contents of the line:

Just change what's inside those quotes " " based on what I wrote in my previous post.

3 Likes

I'm not sure to which folder you are referring, but copies of certsage.php should be in your public_html directory and the subdirectories under public_html that contain the contents for those websites. The structure of the line of code mentioned above and in my previous post should be modified as specified for those copies of certsage.php in the subdirectories.

3 Likes

Hi is there any screen shots I can follow as I have now deleted all folders called certsage with the old version in. I have uploaded new folders one next to the public_html and then I have also added a folder called certsage under the website rogerwoolger.org. in both folders I have uploaded the new version.
but the old version still appears in my browser?
I would love to help put together instructions to help others like me, as I just do not understand what to do. sorry about this. Do you have an example I could follow?

2 Likes

Why are you creating folders at all? When you open certsage.php in a browser, CertSage creates its own CertSage folder that contains all its data (not certsage.php itself). All you need to do is put a copy of certsage.php in your public_html directory and all the website directories under public_html then modify one single line (#18) of each of those copies according to the directions above. I cannot take screenshots because doing so would require my directories under public_html to match yours. Please don't overcomplicate the process. You're making it difficult for yourself. :slightly_smiling_face:

3 Likes

Hi I will go through step by step with you Ihope that is ok.

  1. I put the rogerwoolger.org/certsage.php into my browser but the old version of certsage 1.2.0 and not the new version 1.4.0. So what do I do ?
2 Likes

It is apparent that you still have an old copy of certsage.php present in the webroot directory of rogerwoolger.org. You can see this easily by editing your certsage.php file then looking at the $version on line 17.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.