[download-web/mirrorbits] Add nginx



commit 7d6fc5ce7ba47a14bbde6988c803f5fe61ced580
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Tue Dec 8 08:58:34 2020 +0100

    Add nginx

 nginx/Dockerfile |  2 ++
 nginx/nginx.conf | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)
---
diff --git a/nginx/Dockerfile b/nginx/Dockerfile
new file mode 100644
index 0000000..0ead78d
--- /dev/null
+++ b/nginx/Dockerfile
@@ -0,0 +1,2 @@
+FROM nginxinc/nginx-unprivileged:stable-alpine
+ADD nginx.conf /etc/nginx/nginx.conf
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
new file mode 100644
index 0000000..a0165bc
--- /dev/null
+++ b/nginx/nginx.conf
@@ -0,0 +1,52 @@
+worker_processes  1;
+
+error_log  /dev/stderr warn;
+pid        /tmp/nginx.pid;
+
+include /usr/share/nginx/modules-available/*.conf;
+
+events {
+    worker_connections  1024;
+}
+
+http {
+    proxy_temp_path /tmp/proxy_temp;
+    client_body_temp_path /tmp/client_temp;
+    fastcgi_temp_path /tmp/fastcgi_temp;
+    uwsgi_temp_path /tmp/uwsgi_temp;
+    scgi_temp_path /tmp/scgi_temp;
+
+    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+                      '$status $body_bytes_sent "$http_referer" '
+                      '"$http_user_agent" "$http_x_forwarded_for" "$geoip_country_code"';
+    access_log  /dev/stdout  main;
+
+    include       /etc/nginx/mime.types;
+    default_type  application/octet-stream;
+
+    sendfile        on;
+    #tcp_nopush     on;
+
+    keepalive_timeout  65;
+
+    #gzip  on;
+
+    server {
+        listen 8000 default_server;
+        server_name _;
+
+        root /srv/ftp;
+        autoindex on;
+
+        location ~ .*/$ {
+            autoindex on;
+        }
+
+        location / {
+            proxy_set_header X-Forwarded-For $remote_addr;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_buffering off;
+            proxy_pass http://127.0.0.1:8000;
+    }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]