diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/apache2.config | 6 | ||||
| -rw-r--r-- | config/nginx.config | 14 | ||||
| -rw-r--r-- | config/uwsgi.config | 19 |
3 files changed, 39 insertions, 0 deletions
diff --git a/config/apache2.config b/config/apache2.config new file mode 100644 index 0000000..2489609 --- /dev/null +++ b/config/apache2.config | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | Listen 80 | ||
| 2 | <VirtualHost *:80> | ||
| 3 | DocumentRoot "/var/www/mat2-web/" | ||
| 4 | |||
| 5 | ProxyPass / unix:/var/www/mat2-web/mat2-web.sock|uwsgi://localhost/ | ||
| 6 | </VirtualHost> | ||
diff --git a/config/nginx.config b/config/nginx.config new file mode 100644 index 0000000..b519ee7 --- /dev/null +++ b/config/nginx.config | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | server { | ||
| 2 | server_name _; | ||
| 3 | listen 80 default_server; | ||
| 4 | listen [::]:80 default_server; | ||
| 5 | client_max_body_size 20M; | ||
| 6 | |||
| 7 | root /var/www/mat2-web; | ||
| 8 | |||
| 9 | location / { try_files $uri @yourapplication; } | ||
| 10 | location @yourapplication { | ||
| 11 | include uwsgi_params; | ||
| 12 | uwsgi_pass unix:/var/www/mat2-web/mat2-web.sock; | ||
| 13 | } | ||
| 14 | } | ||
diff --git a/config/uwsgi.config b/config/uwsgi.config new file mode 100644 index 0000000..7108d33 --- /dev/null +++ b/config/uwsgi.config | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | [uwsgi] | ||
| 2 | module=main | ||
| 3 | chdir = /var/www/mat2-web/ | ||
| 4 | callable = app | ||
| 5 | wsgi-file = main.py | ||
| 6 | master = true | ||
| 7 | workers = 1 | ||
| 8 | |||
| 9 | uid = www-data | ||
| 10 | gid = www-data | ||
| 11 | |||
| 12 | # kill stalled processes | ||
| 13 | harakiri = 30 | ||
| 14 | die-on-term = true | ||
| 15 | |||
| 16 | socket = mat2-web.sock | ||
| 17 | chmod-socket = 774 | ||
| 18 | plugins = python3 | ||
| 19 | |||
