• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Issue Securing a custom port with SSL

nuffsaid

New Pleskian
Server operating system version
Ubuntu 20.04.5
Plesk version and microupdate number
Plesk Obsidian 18.0.48
Hello Folks.

is it possible to set up an SSL certificate on a custom port ?
I am running an app on let's say port 9999 and I can only access the app via HTTP , i would like to be able to access is via HTTPS as well, is they a solution where i can set this up ?
Even if it's a custom solution that I can use

Thank you.
 
Hi @nuffsaid,

Are you using like Node.JS or Docker or something within Plesk itself or manually through CLI? If done through plesk it should be proxied through and such should be using whatever certificate assigned. If manually through CLI, you should be able to use the apache & nginx settings for the domain to add additional directives to proxy a location to your specific port and it should still use the specific certificate.

Example for Nginix

NGINX:
location /some/additional/path/for/app {
    proxy_pass http://127.0.0.1:9999
}

If you need to manually add in the certificate for one reason or another, there's 2 ways of doing it. First you can get the current certificate of your domain from the domain's nginx.conf or httpd.conf settings (which, by default, is located under /var/www/vhosts/system/YOUR_DOMAIN.TLD/conf) and update your application to use that or make a copy of the certificate and private key and manually apply that way as well.
 
Back
Top