Skip to content

ngtritham/practice-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Setup

  • MacOS

Install Nginx

brew install nginx && nginx -v

Check Nginx config path

nginx -V

alt text 👉 /opt/homebrew/etc/nginx/nginx.conf

Overide the nginx.conf file

cat nginx.conf >  /opt/homebrew/etc/nginx/nginx.conf

Generate self-signed certificate

mkdir nginx-certs &&
cd nginx-certs &&
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx-selfsigned.key -out nginx-selfsigned.crt

Enter some basic information of the certificate that promted alt text

Reference

Tutorial Source

Commands used in the tutorial

start nginx

nginx

get options

nginx -h

restart nginx

nginx -s reload

stop nginx

nginx -s stop

print logs

tail -f /usr/local/var/log/nginx/access.log

restart nginx

nginx -s reload

create folder for nginx certificates

mkdir ~/nginx-certs cd ~/nginx-certs

create self-signed certificate

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx-selfsigned.key -out nginx-selfsigned.crt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published