User:Simon/Trim4/prototypes/nginx configuration

From XPUB & Lens-Based wiki
< User:Simon‎ | Trim4/prototypes
Revision as of 21:04, 11 December 2019 by Simon (talk | contribs)

nginx configuration

nginx is a web server software that the bootleg library runs on. This configuration allows maximum uploads of 100mb:

server {
 listen 80 default_server;
 listen [::]:80 default_server;
 server_name _;  
 location /bootleglibrary {

   auth_basic           "ヽ(°〇°)ノ";
   auth_basic_user_file /etc/nginx/htpasswd;

   client_max_body_size 100M;

   proxy_bind         $server_addr;
   proxy_pass         http://127.0.0.1:20190;
   proxy_set_header   Host                $http_host;
   proxy_set_header   X-Forwarded-For     $proxy_add_x_forwarded_for;
   proxy_set_header   X-Scheme            $scheme;
   proxy_set_header   X-Script-Name       /bootleglibrary;

   }
}

service file

On Debian/Ubuntu/RHEL/CentOS Linux

Use the following command: # /etc/init.d/nginx restart

OR

# /etc/init.d/nginx reload

OR

# service nginx restart

OR

# service nginx reload

OR if you are using systemd based Linux distro:

$ sudo systemctl restart nginx

OR

$ sudo systemctl reload nginx

To view status:

# service nginx status

OR

$ sudo systemctl status nginx

However, the recommend way is as follows. This should work with any Linux distributions or Unix-like operating systems:

# nginx -s reload

OR

# /path/to/full/nginx -s reload

If nginx is compiled and installed from the source code

If nginx binary is installed at /usr/local/nginx/sbin/nginx, enter:

# /usr/local/nginx/sbin/nginx -s reload