nginx_stage app

This command will generate a web application NGINX configuration file and subsequently restart the NGINX process as the user.

sudo nginx_stage app [OPTIONS]

Required Options

-u <user>, --user <user>

The user of the per-user NGINX process.

-r <sub_request>, --sub-request <sub_request>

The request URI path beneath the sub-URI path.

General Options

-i <sub_uri>, --sub-uri <sub_uri>

The sub-URI path in the request.

-N, --skip-nginx

Skip execution of the per-user NGINX process.

Note

The sub-URI corresponds to any reverse proxy namespace that denotes the request should be proxied to the per-user NGINX server (e.g., /pun)

Examples

To generate an app config from the request:

http://ondemand.center.edu/pun/usr/jim/myapp/session/1

and subsequently restart the per-user NGINX process:

sudo nginx_stage app --user 'bob' --sub-uri '/pun' --sub-request '/usr/jim/myapp/session/1'

To generate only the app config:

sudo nginx_stage app --user 'bob' --sub-uri '/pun' --sub-request '/sys/dashboard' --skip-nginx

This will return the path to the app config and will not restart the NGINX process.

Default Installation

Table 21 details the mapping between the requested URL path to the app root directory for in the NGINX app config under a default installation.

Table 21 Mapping of apps for a default installation
App type URL path File system path
dev /dev/app_name/* ~user/ondemand/dev/app_name
usr /usr/app_owner/app_name/* /var/ww/ood/apps/usr/app_owner/gateway/app_name
sys /sys/app_name/* /var/www/ood/apps/sys/app_name