0
Answered

Tutorial on SSL

Napoolion 9 years ago updated by STAR KIDS 6 years ago 11
Hello!

I am a little lost, I want to install SSL certificate on my server, but not so sure how to do it with Ajenti.

Push to right direction would help.

Best wishes,
Silver

Answer

-1
Answer
Answered
Hi, you need to have a combined PEM certificate file (typically you get it from your certificate vendor), put it on your server, and enter the path to it in Configure > SSL
-1
Answer
Answered
Hi, you need to have a combined PEM certificate file (typically you get it from your certificate vendor), put it on your server, and enter the path to it in Configure > SSL
Thanks Eugene like always.

One more question though.
I added it to my wordpress website in the "websites" spot. 

However it is not really working. How to troubleshoot/fix it :)?

Best wishes,
Silver
Oh, so you meant certificates for your websites? In that case, you need separate Certificate and Key PEM files, which you should add on the SSL tab of your website.
It's not easy to setup the https for a custom domain.
SSL cert generator does not show the path of the certs nor related info.
How should i add a vhost with SSL enabled?? (I've tried also with the _default_ vhost example).
I can answer myself. I remember this issue from the past. Run a2enmod ssl and all should work. The vhost SSL paths are not yet created so you must create them or load your own certs just adding the path. Thank you so much.

Could you be a bit more specific? I have everything set up but when I visit the website I get the default 'Welcome to Nginx' page...

hi all,

i'm on a similar issue and don't get it.
I have a signed certificate and key for my domain.
  • ajenti_XXXX_de.crt
  • ajenti_XXXX_de.key
as addition, i have these one

Can you please tell me in which order i have to combine these all in a single pem to get it working with ajenti config.
I tried several combinations but get still a error when accessing the website. The config works with the ajenti-delivered self-signed certificate.

Thanks you :)
Chris

For several years I've used a rules.conf file in /etc//etc/nginx.custom.d/ to take www off our domains like:


server {

listen 80;
server_name www.domain.com;

return 301 http://domain.com$request_uri; }


This has always worked perfectly. Now I have certificates installed in /etc/letsencrypt/live/domain.com and use the paths correctly in the SSL area of websites. I modified the ports section to only use 443 with SSL checked. HTTPS is working fine on domain.com - but going to www.domain.com throws an error in the browser. This means NGINX rules are not in effect and I've tried several different directives like:



server {

listen 80;
server_name domain.com;

return 301 https://$host$request_uri; }

server {
listen 80;
server_name www.domain.com;
server {
listen 443;
server_name www.domain.com;

return 301 https://domain.com$request_uri; }


None of that appears to work (but none break the site either)


The question is do I need to add www.domain.com as a new website? ...or is there something simple possibly that I am missing.


Thanks for any input about the issue.


I also need to know how to make default https instead of http.


Edit.: Seems solution above working:


server {

listen 80;
server_name domain.com;

return 301 https://$host$request_uri; }

server {
listen 80;
server_name www.domain.com;
server {
listen 443;
server_name www.domain.com;

return 301 https://domain.com$request_uri; }


Thanks Wrrr


Yes, and in "Websites/Ports" you can remove port 80 and put 443 and check box SSL and I believe this forces browser to use ssl if you want that functionality. It works for me. I'm also using letsencrypt and it works good. https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04