Skip to content

Instantly share code, notes, and snippets.

@pvilas
Last active July 30, 2024 12:38
Show Gist options
  • Save pvilas/fbfd64cc43eb9875475017cc510c7ac4 to your computer and use it in GitHub Desktop.
Save pvilas/fbfd64cc43eb9875475017cc510c7ac4 to your computer and use it in GitHub Desktop.
Instalació de Nginx a OSX

Instal.lació de Nginx en OSX

brew
brew install nginx

brew services start nginx # arranca ara i cada vegada que es fa login
brew services stop, restart nginx

# llistar serveis
brew services list

Si volem usar es nostre config, feim nginx -c /path/to/your/custom/nginx.conf.

O /opt/homebrew/opt/nginx/bin/nginx -g daemon\ off\ -c /path/to/your/custom/nginx.conf;

Després de fer canvis, s'ha de recarregar la config amb nginx -s reload.

Es port per defecte és el 808,0 The default port has been set in /opt/homebrew/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo.

La documentació està a /opt/homebrew/var/www

nginx will load all files in /opt/homebrew/etc/nginx/servers/

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