server { server_name {DOMAINNAME}; listen 80; # Domain and SSL Config # ------------------------------------------------- # include snippets/brainson_minimal_ssl_snippet; # ssl_certificate /var/lib/dehydrated/certs/{DOMAINNAME}/fullchain.pem; # ssl_certificate_key /var/lib/dehydrated/certs/{DOMAINNAME}/privkey.pem; # access_log /var/log/nginx/{DOMAINNAME}.access.log; # error_log /var/log/nginx/{DOMAINNAME}.error.log; # Shortener Config # ------------------------------------------------- # set $shortener_data_dir "/var/cache/url-shortener" # set $shortener_redirects_status 302; # WARNING - the following shold NOT be done with more than 1000 Redirects # This includes the files to not go to lua after a restart or reload # There may exist deprecated ones, but anyway ? # # include "/var/cache/url-shortener/{DOMAINNAME}/nginx/*.conf"; # Maybe we can include a important list and symlink from nginx/ to locations.d/ # include "/var/cache/url-shortener/{DOMAINNAME}/locations.d/*.conf"; # The Hostname for the application set $shortener_host "{DOMAINNAME}"; # The default locations include "snippets/url-shortener-server-snippet.conf"; # or # ------------------------------------------------- # location = /edit { # include proxy_params; # # Security Config with ldap auth # # --------------------------------------------- # # include snippets/brainson_ldap_auth_snippet; # proxy_pass http://127.0.0.1:9000; # } # # location = /robots.txt { # return 200 "User-agent: *\nDisallow: /\n"; # } # # location / { # content_by_lua_file "/var/lib/nginx/lua/url-shortener.lua"; # } # # if ($is_bot) { # return 204 ""; # } # ------------------------------------------------- }