I have one website virtual hosting under xampp apache and using certbot to obtain ssl cert
certbot certonly --webroot --w C:\\xampp\\htdocs\\mysite\\wordpress --d www.mysite.com
After successful obtain It created 4 pem files in C:\Certbox\archive\mysite\ and 4 .smylink(.pem) files in C:\Certbox\live\mysite\ which symlink to those 4 files on archive folder
Heres the problem: Everytime I reboot the pc, those 4 .smylink(.pem) files seems lost its target to those 4 pem files in C:\Certbox\archive\mysite\ and seems to became broken and preventing xampp apache from starting
What I've tried:
- Cmd run
cd C:\Certbot\live\mysite\
thendel cert.pem.symlink
and recreatemklink /H cert.pem.symlink C:\Certbot\archive\mysite\cert.pem
It seems like the issue you're facing is related to symbolic links being broken after a system reboot. Windows might reset the symbolic links or the paths might change during startup.
One solution is to create a batch script that recreates the symbolic links each time your computer starts up. Here's an example of how you can create a simple batch script:
Open Notepad or any text editor.
Copy and paste the following script into the editor:
Save the file with a .bat extension, for example, recreate_links.bat. Save it to a location of your choice.
To make this script run on startup, you can create a shortcut to it and place the shortcut in the Startup folder.
Press
Win + R
to open the Run dialog.Type
shell:startup
and press Enter. This opens the Startup folder.Copy the shortcut of your
recreate_links.bat
script into this folder.Now, every time your computer starts up, it will execute the batch script and recreate the symbolic links for you.
PS: Adjust the paths in the script if your actual paths are different.
PPS: This has never happened to me as I primarily use a Linux-based System.