Welcome! Log In Create A New Profile

Advanced

Re: Nginx only serves 1 App

May 23, 2018 11:50PM
Hi Moshe

This works absolutely perfect. Thank you so much for letting me (us) know how to use the config arrangement.

Let me summarize the steps also for other users that might stumble over this thread (and please feel free to correct/improve if required).

After performing the certbot command that you provided above the certificates were produced.

Then I added the Website folder for new.page.com under /var/www/new.page.com and added a simple "hello world" index.html website to it.
Then I made the folder and its contents owned by nginx:nginx

> sudo chown -R nginx:nginx /var/www/new.page.com

Then I added the simple nginx config file that listens on 443 and refers to the website folder:

server {
listen 443 http2 ssl;
listen [::]:443 http2 ssl;
server_name new.page.com;

ssl on;
ssl_certificate /etc/letsencrypt/live/new.page.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/new.page.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

location / {
root /var/www/new.page.com;
}
}

opening new.page.com in the webbrowser will open the "Hello World" page with https.

Now the certificate can be renewed with the command
> sudo certbot renew

This can be checked by performing
> sudo certbot renew --dry-run

This is important because the command "certbot renew" can easily be added to a crontab for automatic renewal of the certificates.

I hope the above helps other people as well.
Thank you again Moshe.

Until another given time ;-)

Chris
Subject Author Posted

Nginx only serves 1 App

Nginx-Chris May 15, 2018 04:35AM

Re: Nginx only serves 1 App

wickedhangover May 15, 2018 07:30AM

Re: Nginx only serves 1 App

Moshe Katz May 15, 2018 09:18AM

Re: Nginx only serves 1 App

Nginx-Chris May 15, 2018 04:32PM

Re: Nginx only serves 1 App

Moshe Katz May 15, 2018 11:46PM

Re: Nginx only serves 1 App

Nginx-Chris May 16, 2018 01:08AM

Re: Nginx only serves 1 App

Nginx-Chris May 16, 2018 01:12AM

Re: Nginx only serves 1 App

Nginx-Chris May 16, 2018 01:41AM

Re: Nginx only serves 1 App

Moshe Katz May 16, 2018 09:16AM

Re: Nginx only serves 1 App

Nginx-Chris May 23, 2018 04:14PM

Re: Nginx only serves 1 App

Nginx-Chris May 23, 2018 04:14PM

Re: Nginx only serves 1 App

Moshe Katz May 23, 2018 09:30PM

Re: Nginx only serves 1 App

Nginx-Chris May 23, 2018 11:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready