summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJan Friedli2020-03-28 13:45:19 +0100
committerJan Friedli2020-05-09 21:16:09 +0200
commit40d4fdad9e8ce5872adf18100196fa77044642c1 (patch)
tree4028f88ecb40d7ad5c50a7eed5434f4355d3e682 /config
parent853ace7d83424f85d903f6ffe2352bf41f86b7ce (diff)
use a non root user to start nginx
Diffstat (limited to 'config')
-rw-r--r--config/nginx-default.conf (renamed from config/nginx.config)4
-rw-r--r--config/nginx.conf69
2 files changed, 71 insertions, 2 deletions
diff --git a/config/nginx.config b/config/nginx-default.conf
index b519ee7..fd3e2f1 100644
--- a/config/nginx.config
+++ b/config/nginx-default.conf
@@ -1,7 +1,7 @@
1server { 1server {
2 server_name _; 2 server_name _;
3 listen 80 default_server; 3 listen 8080 default_server;
4 listen [::]:80 default_server; 4 listen [::]:8080 default_server;
5 client_max_body_size 20M; 5 client_max_body_size 20M;
6 6
7 root /var/www/mat2-web; 7 root /var/www/mat2-web;
diff --git a/config/nginx.conf b/config/nginx.conf
new file mode 100644
index 0000000..3daac64
--- /dev/null
+++ b/config/nginx.conf
@@ -0,0 +1,69 @@
1user nginx;
2worker_processes auto;
3pid /tmp/nginx.pid;
4include /etc/nginx/modules-enabled/*.conf;
5
6events {
7 worker_connections 768;
8 # multi_accept on;
9}
10
11http {
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 # server_tokens off;
23
24 # server_names_hash_bucket_size 64;
25 # server_name_in_redirect off;
26
27 include /etc/nginx/mime.types;
28 default_type application/octet-stream;
29
30 ##
31 # SSL Settings
32 ##
33
34 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
35 ssl_prefer_server_ciphers on;
36
37 ##
38 # Logging Settings
39 ##
40
41 access_log /var/log/nginx/access.log;
42 error_log /var/log/nginx/error.log;
43
44 ##
45 # Gzip Settings
46 ##
47
48 gzip on;
49
50 # gzip_vary on;
51 # gzip_proxied any;
52 # gzip_comp_level 6;
53 # gzip_buffers 16 8k;
54 # gzip_http_version 1.1;
55 # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
56
57 ##
58 # Virtual Host Configs
59 ##
60
61 include /etc/nginx/conf.d/*.conf;
62 include /etc/nginx/sites-enabled/*;
63
64 proxy_temp_path /tmp/proxy_temp;
65 client_body_temp_path /tmp/client_temp;
66 fastcgi_temp_path /tmp/fastcgi_temp;
67 uwsgi_temp_path /tmp/uwsgi_temp;
68 scgi_temp_path /tmp/scgi_temp;
69}