X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server-configs%2Fnginx%2Fsites-enabled%2Fmctxconfig;h=97e46b6a5bf6697b3bbc7d33734515b9ff0b2c2c;hb=3a26204db04e6c4e6393fe4969b4f2668bb4be2e;hp=149115250b007dd22513e3dbb3fe3f2c4eb266ee;hpb=270dc6627ca3a8417d50195da96a8acc859d9e7b;p=matches%2FMCTX3420.git diff --git a/server-configs/nginx/sites-enabled/mctxconfig b/server-configs/nginx/sites-enabled/mctxconfig index 1491152..97e46b6 100644 --- a/server-configs/nginx/sites-enabled/mctxconfig +++ b/server-configs/nginx/sites-enabled/mctxconfig @@ -1,8 +1,24 @@ server { - listen 80; + #Redirect HTTP to HTTPS + listen [::]:80; + return 301 https://$host$request_uri; +} + +server { + listen 443; + + ssl on; + ssl_certificate /usr/share/nginx/conf/server.crt; + ssl_certificate_key /usr/share/nginx/conf/server.key; + + ssl_session_timeout 5m; + + ssl_protocols SSLv3 TLSv1; + ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; + ssl_prefer_server_ciphers on; #Change this to match your root directory - root /usr/share/nginx/html; + root /usr/share/nginx/www; index index.php index.html index.htm; # Make site accessible from http://localhost/ @@ -65,11 +81,17 @@ server { } #Program log - location ^~ /api/log { + location = /api/log { alias /var/log/mctxserv.log; default_type text/plain; } + #Program error log + location = /api/errorlog { + alias /var/log/mctxserv-error.log; + default_type text/plain; + } + location ~ ^/api/?([^?]*) { fastcgi_pass 127.0.0.1:9005; fastcgi_param DOCUMENT_URI_LOCAL $1;