ansible/test/integration/targets/docker-registry/files/nginx.conf
Felix Fontein a79f7e575a
docker_image and docker_login: move tests needing a registry into own target, add tests for docker_login (#62721)
* Move tests with docker registry into own target.

* Add docker_login tests.

* Add step which makes sure hello-world:latest is around.

* Make work inside docker container.

* Add dependency.

* Use plaintext password.

* Forgot check_mode.

* Add no_log to avoid double log output in verbose mode.
2019-09-30 06:09:00 +02:00

46 lines
1.6 KiB
Nginx Configuration File

events {
worker_connections 16;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
error_log /dev/stdout info;
access_log /dev/stdout;
server {
listen *:5000 ssl;
server_name test-registry.ansible.com;
server_name_in_redirect on;
ssl_protocols TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256';
ssl_ecdh_curve X25519:secp521r1:secp384r1;
ssl_prefer_server_ciphers on;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/cert.key;
location / {
return 401;
}
location /v2/ {
proxy_pass http://real-registry:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Request-Start $msec;
client_max_body_size 0;
chunked_transfer_encoding on;
auth_basic "Ansible Test Docker Registry";
auth_basic_user_file /etc/nginx/nginx.htpasswd;
}
}
}