Implement ssl with different port in nginx (LEMP stack)


#1

My domain is: fitplans.co.uk

I have successfully installed lets encrypt ssl on my site.

My server is on LEMP stack (linux, ngnix, mysql, php)

Everything is ok for now but the problem is when i install webmin it is running on different port,
How can i use that port with SSL ??

I tried to edit /etc/nginx/sites-enabled/fitplans.co.uk with this configuration

server {
    server_name fitplans.co.uk   www.fitplans.co.uk;
    root /usr/share/webmin;

    index.cgi;

    listen 10000 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/fitplans.co.uk/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/fitplans.co.uk/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}

But it failed to start the server.
I am a noob, so please tell me how can i implement ssl to 10000 port ?


#2

Hi @kirainhere

if you install webmin, then webmin may start it’s own webserver.

So if you start your own server

that can’t work, port 10000 is already blocked by webmin. You have to change your webmin configuration.

http://www.webmin.com/ssl.html


#3

@JuergenAuer
Thanks for your reply Sir.

Web host manager (Cpanel) in godaddy is maybe running 2083 with ssl
I think the WHM is creating its own server, i might be wrong.
But my question is how ssl enable on port 2083 if it already a server and block by cpanel ?


#4

@JuergenAuer I tried the solution, It not fully installed and also delete my letsencrypt certification from my server.

Can you suggest me another way ??


#5

If you use cPanel, then you should use the integrated solution there.

https://www.fitplans.co.uk/ works, https://www.fitplans.co.uk:2083/ doesn’t work, but that may be a problem of the firewall or something else.


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.