Edit hosts
file
location: /etc/hosts
1 |
|
Install nginx
1 | apt-get update |
Control:
1 | nginx -s [ stop | quit | reopen | reload ] |
Generate self-signed TLS certificate using OpenSSL
A great guy wrote a bash script
Just execute the script and pass in the options
Options:
-c
|--country
Country Name (2 letter code)
-s
|--state
State or Province Name (full name)
-l
|--locality
Locality Name (eg, city)
-o
|--organization
Organization Name (eg, company)
-u
|--unit
Organizational Unit Name (eg, section)
-n
|--common-name
Common Name (e.g. server FQDN or YOUR name)
-e
|--email
Email Address
-p
|--path
Path to output generated keys
-h
|--help
Display help and exit
-v
|--verbose
Verbose output
Usage:
1 | # Generate the certificate in the previously created directory 'ssl' |
Import the crt
to the browser and restart
Chrome:
Setting
-> (Advanced) Manage Certificates
-> toggle to the 'Authorities'(Tab)
-> Import
1 |
|
-> Restart the browser
Configure nginx and reload
Edit /etc/nginx/nginx.conf
1 | # ... |