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|--countryCountry Name (2 letter code)
-s|--stateState or Province Name (full name)
-l|--localityLocality Name (eg, city)
-o|--organizationOrganization Name (eg, company)
-u|--unitOrganizational Unit Name (eg, section)
-n|--common-nameCommon Name (e.g. server FQDN or YOUR name)
-e|--emailEmail Address
-p|--pathPath to output generated keys
-h|--helpDisplay 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)-on-local-development-environment/shot1.png)
-> Import
1 |
|
-> Restart the browser
Configure nginx and reload
Edit /etc/nginx/nginx.conf
1 | # ... |
Done