Skip to content
Snippets Groups Projects
Select Git revision
  • forbid-save-as
  • upload-via-token
  • moodle-integration
  • patch-double-tap-seek
  • patch_datum_anzeigen
  • patch_raum_anzeigen
  • master default protected
  • intros
  • live_sources
  • bootstrap4
  • modules
11 results

nginx.conf.example

Blame
  • Forked from Video AG Infrastruktur / website
    368 commits behind the upstream repository.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    nginx.conf.example 1.38 KiB
    # 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;
    			auth_request_set $trackingcookie $upstream_http_set_cookie;
    			# For use with sshfs (recommended)
    				#alias /mnt/videoag/srv/videoag/released/;
    				#add_header Set-Cookie $trackingcookie;
    			# For use without sshfs
    				proxy_pass https://videoag.fsmpi.rwth-aachen.de/;
    				proxy_set_header Host "videoag.fsmpi.rwth-aachen.de";
    				proxy_set_header Set-Cookie $trackingcookie;
    		}
    		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;
    		}
    	}
    }