Reputation: 67
I'm using command:
sudo certbot --apache-ctl /opt/lampp/bin/apachectl
to install the certificate in XAMPP server. However the certificate is installing in the /etc/apache2 location. How can I repoint to the XAMPP Apache server? The logs is below:
ubuntu@ip-172-31-33-70:~$ sudo certbot --apache-ctl /opt/lampp/bin/apachectl
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter 'c' to cancel): ploshop.co.in
Cert not yet due for renewal
You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/ploshop.co.in.conf)
What would you like to do?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Renewing an existing certificate
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Your existing certificate has been successfully renewed, and the new certificate
has been installed.
The new certificate covers the following domains: https://ploshop.co.in
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=ploshop.co.in
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/ploshop.co.in/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/ploshop.co.in/privkey.pem
Your cert will expire on 2021-11-17. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
ubuntu@ip-172-31-33-70:~$
Upvotes: 1
Views: 9716
Reputation: 81336
Modify the locations based upon your installation. I am using the default paths.
Edit the file
Linux: /opt/lampp/apache/conf/extra/httpd-ssl.conf
Windows: /xampp/apache/conf/extra/httpd-ssl.conf
Locate the section that defines the port 443 listener:
Change this part:
<VirtualHost *:443>
...
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
To:
<VirtualHost *:443>
...
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/ploshop.co.in/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/ploshop.co.in/privkey.pem"
Do not forget to restart apache.
Upvotes: 1