Services/Nginx: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
Line 6: Line 6:
<source lang="nginx">
<source lang="nginx">
autoindex on;
autoindex on;
</source>
|-
| ||
<source lang="nginx">
server_name _;
</source>
|-
| Prevent 413 Too Large ... ||
<source lang="nginx">
client_max_body_size 128m;
</source>
</source>
|}
|}

Revision as of 12:01, 19 February 2019

Quick References

TODO Command
List directory
autoindex on;
server_name _;
Prevent 413 Too Large ...
client_max_body_size 128m;

Install nginx on macOS 10.13+

Default nginx package in Homebrew is missing many modules.

Tap 3rd party package is useful for development.

brew tap denji/nginx

brew install nginx-full \
  --with-echo-module \
  --with-autols-module \
  --with-geoip2-module \
  --with-http2 \
  --with-upload-module \
  --with-upload-progress-module

Running nginx as nobody is inconvenient for development. Running as login account is better.

/usr/local/etc/nginx/nginx.conf:2

user  myaccount admin;

Priority of location