containerized-data-importer/hack/build/docker/cdi-func-test-file-host-http/nginx.conf
2019-03-05 18:15:33 -05:00

78 lines
1.2 KiB
Nginx Configuration File

worker_processes 1;
daemon off;
events { worker_connections 1024; }
http {
types_hash_max_size 4096;
include /etc/nginx/mime.types;
sendfile on;
# no auth
server {
server_name localhost;
listen 80;
root /tmp/shared/images;
location / {
autoindex on;
autoindex_format json;
}
}
# auth
server {
server_name localhost;
listen 81;
root /tmp/shared/images;
auth_basic "auth test";
auth_basic_user_file /etc/nginx/htpasswd;
location / {
autoindex on;
autoindex_format json;
}
}
# no auth. rate limit
server {
server_name localhost;
listen 82;
root /tmp/shared/images;
location / {
autoindex on;
autoindex_format json;
limit_rate 10k;
}
}
# tls
server {
server_name localhost;
listen 443 ssl;
ssl_certificate /tmp/shared/certs/tls.crt;
ssl_certificate_key /tmp/shared/certs/tls.key;
root /tmp/shared/images;
location / {
autoindex on;
autoindex_format json;
}
}
}