# Inside the existing HTTPS server for cap.alert-hub.org. # Place before conflicting regex locations. Paths/socket are deployment examples. location ^~ /public/ { rewrite "^/public/([a-z0-9][a-z0-9-]{0,63})/rss\.xml$" /xsltprocessor.php?feed=$1&format=xml? last; rewrite "^/public/([a-z0-9][a-z0-9-]{0,63})/rss$" /xsltprocessor.php?feed=$1? last; rewrite "^/public/([a-z0-9][a-z0-9-]{0,63})/([A-Za-z0-9][A-Za-z0-9_-]{0,127})\.xml$" /xsltprocessor.php?feed=$1&alert=$2&format=xml? last; rewrite "^/public/([a-z0-9][a-z0-9-]{0,63})/([A-Za-z0-9][A-Za-z0-9_-]{0,127})$" /xsltprocessor.php?feed=$1&alert=$2? last; return 404; } location = /xsltprocessor.php { internal; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /srv/cap-publication/xsltprocessor.php; fastcgi_pass unix:/run/php/cap-publication.sock; fastcgi_read_timeout 15s; }