ARE-NGINX
Last modified by Robert Pele on 2021/06/16 07:15
Purpose
This software stack provides a very simple artifact repository based on the NGINX webserver.
Properties
Stack-Description | NGINX Artifact Repository (ARE) |
---|---|
Stack-Image | docker.msg.team/ps/docker-stack-are-nginx |
Stack-Version | 1.25.3-r1 |
Stack-Release | 20231130 |
Product-Name | NGINX |
Product-Vendor | NGINX, Inc |
Product-Contact | https://nginx.org/ |
Product-Model | Open Source |
Product-License | MIT |
Product-Limits | none |
Implementation Base | C |
Execution Base | Webserver |
Initial Start Time | 00:00:03 |
Documentation | https://nginx.org/en/docs/ |
Topology
The stack consists of one container:
- are-nginx: the webserver is running in this container Port 8080
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. | ||
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. |
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
nginx expect webcontent.
Related Documents