# Default server configuration
#
server {
- listen WEBPORT ssl default_server ;
- listen [::]:WEBPORT ssl default_server;
+ listen WEBPORT ssl default_server ;
+ listen [::]:WEBPORT ssl default_server;
- # SSL configuration
- #
- # listen 443 ssl default_server;
- # listen [::]:443 ssl default_server;
- #
- # Note: You should disable gzip for SSL traffic.
- # See: https://bugs.debian.org/773332
- #
- # Read up on ssl_ciphers to ensure a secure configuration.
- # See: https://bugs.debian.org/765782
- #
- # Self signed certs generated by the ssl-cert package
- # Don't use them in a production server!
- #
- # include snippets/snakeoil.conf;
+ # SSL configuration
+ #
+ # listen 443 ssl default_server;
+ # listen [::]:443 ssl default_server;
+ #
+ # Note: You should disable gzip for SSL traffic.
+ # See: https://bugs.debian.org/773332
+ #
+ # Read up on ssl_ciphers to ensure a secure configuration.
+ # See: https://bugs.debian.org/765782
+ #
+ # Self signed certs generated by the ssl-cert package
+ # Don't use them in a production server!
+ #
+ # include snippets/snakeoil.conf;
- ssl_certificate SSL_CERT_DIR/SSL_CERTIFICATE;
- ssl_certificate_key SSL_CERT_DIR/SSL_CERTIFICATE_KEY;
-
-# root /var/www;
+ ssl_certificate SSL_CERT_DIR/SSL_CERTIFICATE;
+ ssl_certificate_key SSL_CERT_DIR/SSL_CERTIFICATE_KEY;
- index index.html index.htm index.nginx-debian.html;
+# root /var/www;
- server_name _;
+ index index.html index.htm index.nginx-debian.html;
- location ~ ^/$ {
- return 301 /odlux/index.html;
- }
- location ~ /help/$ {
- try_files /help/$args.json $uri;
- }
- location / {
- try_files $uri $uri/ @backend;
- }
- location /websocket {
- proxy_pass SDNRPROTOCOL://SDNRHOST:SDNRPORT/websocket;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- location @backend {
- proxy_pass SDNRPROTOCOL://SDNRHOST:SDNRPORT;
- }
+ server_name _;
+ include server_blocks/location.rules;
+
+ gzip on;
+ gzip_min_length 1000;
+ gzip_comp_level 5;
+ gzip_proxied any;
+ gzip_vary on;
+ gzip_types text/plain
+ application/json
+ application/xml
+ application/yang-data+json
+ application/yang-data+xml
+ text/javascript
+ application/javascript;
}
-