Configure nginx on Debian - hpaluch/hpaluch.github.io GitHub Wiki
Quick setup of nginx/ssl under Debian 9.5
Install following packages:
apt-get install nginx ssl-cert
The nginx should be now listening on port :80
so pointing your
browser to url http://IP_OF_YOUR_SERVER
should work.
Enabling ssl with self signed cert
I think that it is good way to try self-signed cert (installed byt ssl-cert
package)
before going to Let's encrypt etc...
To enable ssl you need to uncomment following lines in /etc/nginx/sites-available/default
:
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
include snippets/snakeoil.conf;
And restart nginx using:
systemctl restart nginx
Your nginx should be now available at https://YOUR_SERVER_IP
.
Most browser will (of course) show warning that certificate is self-signed, but it is OK for testing.