updates
- TODO: Fix bug in navbar and directing
This commit is contained in:
@@ -1,23 +1,84 @@
|
||||
# Example for conf.d/default.conf
|
||||
user www-data;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
upstream notenextra-math {
|
||||
server notenextra-math:4200;
|
||||
}
|
||||
|
||||
upstream notenextra-cse {
|
||||
server notenextra-cse:4200;
|
||||
}
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
# add extra types
|
||||
|
||||
types {
|
||||
text/javascript mjs;
|
||||
}
|
||||
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location /Math* {
|
||||
proxy_pass http://notenextra-math:4201;
|
||||
rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
|
||||
rewrite ^/.well-known/caldav /remote.php/dav/ permanent;
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/Math(.*)$ {
|
||||
proxy_pass http://notenextra-math/$1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /CSE* {
|
||||
proxy_pass http://notenextra-cse:4202;
|
||||
location ~ ^/CSE(.*)$ {
|
||||
proxy_pass http://notenextra-cse/$1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://notenextra-cse;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user