Create nginx.conf
Browse files- nginx.conf +94 -0
nginx.conf
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
error_log /tmp/error.log warn;
|
| 2 |
+
worker_processes auto;
|
| 3 |
+
pid /tmp/nginx.pid;
|
| 4 |
+
include /etc/nginx/modules-enabled/*.conf;
|
| 5 |
+
|
| 6 |
+
events {
|
| 7 |
+
worker_connections 768;
|
| 8 |
+
multi_accept on;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
http {
|
| 12 |
+
|
| 13 |
+
##
|
| 14 |
+
# Basic Settings
|
| 15 |
+
##
|
| 16 |
+
|
| 17 |
+
sendfile on;
|
| 18 |
+
tcp_nopush on;
|
| 19 |
+
tcp_nodelay on;
|
| 20 |
+
keepalive_timeout 65;
|
| 21 |
+
types_hash_max_size 2048;
|
| 22 |
+
proxy_buffering off;
|
| 23 |
+
client_max_body_size 800m;
|
| 24 |
+
# server_tokens off;
|
| 25 |
+
|
| 26 |
+
# server_names_hash_bucket_size 64;
|
| 27 |
+
# server_name_in_redirect off;
|
| 28 |
+
|
| 29 |
+
include /etc/nginx/mime.types;
|
| 30 |
+
|
| 31 |
+
default_type application/octet-stream;
|
| 32 |
+
proxy_temp_path /tmp/proxy_temp;
|
| 33 |
+
client_body_temp_path /tmp/client_temp;
|
| 34 |
+
fastcgi_temp_path /tmp/fastcgi_temp;
|
| 35 |
+
uwsgi_temp_path /tmp/uwsgi_temp;
|
| 36 |
+
scgi_temp_path /tmp/scgi_temp;
|
| 37 |
+
|
| 38 |
+
##
|
| 39 |
+
# SSL Settings
|
| 40 |
+
##
|
| 41 |
+
|
| 42 |
+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
| 43 |
+
ssl_prefer_server_ciphers on;
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
##
|
| 47 |
+
# Gzip Settings
|
| 48 |
+
##
|
| 49 |
+
|
| 50 |
+
gzip on;
|
| 51 |
+
|
| 52 |
+
# gzip_vary on;
|
| 53 |
+
# gzip_proxied any;
|
| 54 |
+
# gzip_comp_level 6;
|
| 55 |
+
# gzip_buffers 16 8k;
|
| 56 |
+
# gzip_http_version 1.1;
|
| 57 |
+
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
| 58 |
+
|
| 59 |
+
##
|
| 60 |
+
# Virtual Host Configs
|
| 61 |
+
##
|
| 62 |
+
|
| 63 |
+
#include /etc/nginx/conf.d/*.conf;
|
| 64 |
+
#include /etc/nginx/sites-enabled/*;
|
| 65 |
+
server {
|
| 66 |
+
listen 7860;
|
| 67 |
+
|
| 68 |
+
access_log /tmp/access.log;
|
| 69 |
+
server_name _;
|
| 70 |
+
|
| 71 |
+
root /var/www/example.com;
|
| 72 |
+
index index.html;
|
| 73 |
+
location ~ /jupyter {
|
| 74 |
+
proxy_pass http://127.0.0.1:5050;
|
| 75 |
+
proxy_http_version 1.1;
|
| 76 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 77 |
+
proxy_set_header Connection "Upgrade";
|
| 78 |
+
proxy_set_header Host $host;
|
| 79 |
+
proxy_read_timeout 86400;
|
| 80 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 81 |
+
}
|
| 82 |
+
error_page 502 = /jupyter;
|
| 83 |
+
location / {
|
| 84 |
+
proxy_pass http://127.0.0.1:3000;
|
| 85 |
+
proxy_http_version 1.1;
|
| 86 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 87 |
+
proxy_set_header Connection "Upgrade";
|
| 88 |
+
proxy_set_header Host $host;
|
| 89 |
+
proxy_read_timeout 86400;
|
| 90 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 91 |
+
#try_files $uri $uri/ =404;
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
}
|