Skip to content

Instantly share code, notes, and snippets.

@parsaM110
Last active February 27, 2026 11:26
Show Gist options
  • Select an option

  • Save parsaM110/f87d252dd4151ab8af240d1d5216010e to your computer and use it in GitHub Desktop.

Select an option

Save parsaM110/f87d252dd4151ab8af240d1d5216010e to your computer and use it in GitHub Desktop.
ngnix

linux (apt) Nginx uses the Debian-style directory structure:

sudo apt isntall ngnix

check it with:

sudo systemctl status nginx
  • /etc/nginx/nginx.conf — main config

  • /etc/nginx/sites-available/ — virtual host configs

  • /etc/nginx/sites-enabled/ — symlinks to active hosts

  • /etc/nginx/conf.d/ — extra config snippets

No servers/ folder by default

linux / macOS (brew)

  • /usr/local/etc/nginx/nginx.conf — main config

  • /usr/local/etc/nginx/servers/ — Homebrew’s equivalent of sites-enabled

No sites-available / sites-enabled split

Homebrew creates a simplified layout, and adds a servers/ directory for virtual host configs.

test current setup

sudo nginx -t

running sudo nginx would run in ngnix but in linux you manage it by systemctl

reload config by

sudo ngnix -s reload

base config

http {
	server {
		listen 80;
		root /home/quick-example;
	}
}

events{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment