ARE-OpenResty
Last modified by Christian Reiber on 2021/09/23 14:00
Purpose
Properties
Stack-Description | OpenResty Artifact Repository (ARE) |
---|---|
Stack-Image | docker.msg.team/ps/docker-stack-are-openresty |
Stack-Version | 1.25.3.1 |
Stack-Release | 20240626 |
Product-Name | OpenResty |
Product-Vendor | OpenResty, Inc |
Product-Contact | https://openresty.org/ |
Product-Model | Open Source |
Product-License | BSD |
Product-Limits | none |
Implementation Base | LUA |
Execution Base | Webserver extends nginx wit LUA |
Initial Start Time | 00:00:05 |
Documentation | https://openresty.org/en/resources.htmlhttps://openresty.org/en/resources.html |
Topology
The stack consists of 1 container:
- are-openresty: the whole service is running in this container
Configuration
The nginx server comes with a default nginx.conf wich can be extended by the following configurations.
nginx.conf:
server {
server_name _;
listen 0.0.0.0:8080 default_server;
root /data/nginx;
autoindex on;
index index.html;
charset utf-8;
location /example/ {
rewrite ^/example/(.*) / break;
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
include /conf/nginx/*.conf;
}
}
server_name _;
listen 0.0.0.0:8080 default_server;
root /data/nginx;
autoindex on;
index index.html;
charset utf-8;
location /example/ {
rewrite ^/example/(.*) / break;
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
include /conf/nginx/*.conf;
}
}
Variable Name | Default | Meaning | |
CFG_NGINX_DATADIR | Folder with static web content available at root "/". The folder will be mounted to /data/nginx. See root directory definition in the example above. | ||
CFG_NGINX_CONFIGDIR | Folder with several *.conf files that will be included in the standard server part of the nginx.conf. The folder will be mounted to /conf/nginx/. See include in the example above. These files may hold lua blocks or lua file includes to execute lua code. | ||
CFG_NGINX_CONFIGFILE | File that will be included in the standard server part of the nginx.conf. The file will be mountet to /conf/nginx/custom.conf. See include in the example above. This file may hold lua blocks or lua file includes to execute lua code. |
See also the variables which control integration of the stack into the reverse proxy.
For changes to take effect the stack has to be reinstalled.
First Steps
openresty expect webcontent.
Related Documents