Skip to content
Snippets Groups Projects
Commit d51c58c8 authored by Julian Rother's avatar Julian Rother
Browse files

Added minimal nginx config to test permission features

parent dff4e420
No related branches found
No related tags found
No related merge requests found
...@@ -2,5 +2,10 @@ ...@@ -2,5 +2,10 @@
config.py config.py
__pycache__ __pycache__
*.sqlite *.sqlite
files
files/* files/*
static/500.html static/500.html
nginx.err.log
nginx.log
nginx.pid
uwsgi.sock
...@@ -14,6 +14,8 @@ SQLITE_INIT_DATA sollte also wenigstens beim ersten Durchlauf True sein) ...@@ -14,6 +14,8 @@ SQLITE_INIT_DATA sollte also wenigstens beim ersten Durchlauf True sein)
6. unter [http://localhost:5000](http://localhost:5000) ist die Website verfügbar 6. unter [http://localhost:5000](http://localhost:5000) ist die Website verfügbar
7. Moderatorlogin mit user: `videoag` Passwort: `videoag` 7. Moderatorlogin mit user: `videoag` Passwort: `videoag`
Alternativ, insbesondere zum Testen der Zugriffsbeschränkungen: Siehe `nginx.example.py`.
### Zum Mitmachen: ### Zum Mitmachen:
1. Repo zum User clonen, dafür den "Clone-Button auf der Website verwenden 1. Repo zum User clonen, dafür den "Clone-Button auf der Website verwenden
2. Weiter mit 'Zum Testen' 2. Weiter mit 'Zum Testen'
......
# Debug-only nginx config for this website
#
# Requires system-wide installation of nginx (for /etc/nginx/*)
#
# 1. Start nginx
# nginx -c nginx.conf.example -p .
# 2. Start uwsgi
# uwsgi -s uwsgi.sock --manage-script-name --mount /=server:app --plugin python --enable-threads
# 3. Visit http://localhost:5000/
pid nginx.pid;
error_log nginx.err.log;
events {
worker_connections 768;
}
http {
access_log nginx.log;
client_body_in_file_only off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server {
#listen 5000;
#listen [::]:5000;
listen localhost:5000;
error_page 502 /static/500.html;
location /static/ {
root .;
}
location /files/ {
auth_request /auth;
# For use with sshfs (recommended)
#alias /mnt/videoag/srv/videoag/released/;
# For use without sshfs
proxy_pass https://videoag.fsmpi.rwth-aachen.de/;
proxy_set_header Host "videoag.fsmpi.rwth-aachen.de";
}
location / {
include /etc/nginx/uwsgi_params;
uwsgi_param REQUEST_URI $uri;
uwsgi_param HTTP_X_ORIGINAL_URI $request_uri;
uwsgi_param HTTP_X_REAL_IP $remote_addr;
uwsgi_pass unix:uwsgi.sock;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment