Reputation: 83
I tried to setup a SSL certificate with: https://certbot.eff.org/lets-encrypt/ubuntuxenial-apache documentation.
It worked, the only problem was that it's on the wrong Apache server. I got 2 Apache server's on my Ubuntu 16.04 System. 1 is linking to /var/www/html and the other one (this one is of my XWAMPP server) is linking to /opt/lampp/htdocs
The Apache server that links to /var/www/html on this one the SSL is activated. With the command: sudo certbot --apache
I want it to be activated on the Apache server of the XAMPP. How can I edit this command so it calls the other Apache server?
Upvotes: 1
Views: 4766
Reputation: 117
I solved this with next steps: (*) First of all, you should be avaible certbot command and your virtualhost should be configured for the domain that you need https. f.e. mydomain.com. verify the domain is avaible in your browser.
This, create the cert, in /etc/letsencrypt/live/mydomain.com/.
Upvotes: 2
Reputation: 189
I solved this issue.
sudo certbot --apache-ctl /opt/lampp/bin/apachectl
sudo nano /opt/lampp/etc/httpd.conf
------------
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
Include etc/extra/httpd-vhosts-le-ssl.conf #Add it here
Upvotes: -2
Reputation: 34
It will work but for this you need and static ip and portforward 80 and 443 to your system ip and link with domain you can try no-ip they will give you free domain after that you need to visit https://www.sslforfree.com/ after this follow the step they say. After verifying you can download the ssl file. you need to put extract file in C:\xampp\apache\conf
after this goto C:\xampp\apache\conf\extra
and edit httpd-vhosts.conf and following thing you can change according to your domain or root directory
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/xampp/htdocs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot "C:/xampp/htdocs/upload"
ServerName osticketamcat.ddns.net
ServerAlias osticketamcat.ddns.net
SSLEngine on
SSLCACertificateFile "C:\xampp\apache\conf\ssl\ca_bundle.crt"
SSLCertificateFile "C:\xampp\apache\conf\ssl.crt\server.crt"
SSLCertificateKeyFile "C:\xampp\apache\conf\ssl.key\server.key"
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
<Directory "C:/xampp/htdocs/upload">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
Upvotes: 1