Hello, I followed the docs on how to install an SSL but I have multiple ports that run on my droplet. I’d actually like to not be limited by which port SSL runs on. Is this possible?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Is it possible to configure “https” in same domain for multiple ports? Like https://example.com:446 https://example.com:447
First you need to tell apache to listen on multiple ports. You can do that by editing the /etc/apache2/ports.conf
Listen 80
<IfModule ssl_module>
Listen 443
Listen 444
Listen 446
</IfModule>
And your virtualhost file should look like this with the port number.
<VirtualHost *:446>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>
Thanks for the answer, but I forgot to mention I was using nginx instead of Apache. How would this change, since I assume I’d be editing the /etc/nginx/sites-available/default file, right?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.