diff options
Diffstat (limited to 'doc/note/nginx/nginx.txt')
-rw-r--r-- | doc/note/nginx/nginx.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/note/nginx/nginx.txt b/doc/note/nginx/nginx.txt index 2a15ae5..75f2431 100644 --- a/doc/note/nginx/nginx.txt +++ b/doc/note/nginx/nginx.txt @@ -1,4 +1,51 @@ +## Basic nginx config + +[looks promising](https://stackoverflow.com/a/73297125/4415884) + + # Basic setup: + # - Maybe change "access_log" to "/var/log/nginx/access.log". + # - For CLI use: Change all "/tmp/nginx" to "." (single dot, aka workdir or + # other user writable dir). + # Public expose setup: + # - Adapt "listen" as commented. + # - set "server_name" to meaningful value. + # + #daemon off; # run in foreground (eg from cli) + #user www-data; + #worker_processes auto; + pid /run/nginx.pid; + events {} + http { + access_log /dev/stdout; + # Directories nginx needs configured to start up. + client_body_temp_path /tmp/nginx; + proxy_temp_path /tmp/nginx; + fastcgi_temp_path /tmp/nginx; + uwsgi_temp_path /tmp/nginx; + scgi_temp_path /tmp/nginx; + server { + # public access: "80" and "[::]:80" + # local access: "127.0.0.1:80" and "[::1]:80" + listen 127.0.0.1:80; + listen [::1]:80; + server_name localhost; + root /srv/www; + location /foo { + #autoindex on; # directory listing + try_files $uri $uri/ =404; + } + location /example { + return 200 "Example says hi"; + } + } + } + + +[tutorial](https://www.javatpoint.com/nginx-minimal-configuration) + + + ## fCGI keep alive backend connections upstream myFancyBackend { |