Linux/Nginx: Difference between revisions
< Linux
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
</pre> | </pre> | ||
</blockquote> | </blockquote> | ||
== htpasswd == | |||
<pre> | |||
sudo sh -c "echo -n 'username:' >> .htpasswd" | |||
sudo sh -c "openssl passwd -apr1 >> .htpasswd" | |||
</pre> | |||
Latest revision as of 11:01, 25 June 2019
- nginx
- SSL
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt
htpasswd
sudo sh -c "echo -n 'username:' >> .htpasswd" sudo sh -c "openssl passwd -apr1 >> .htpasswd"