nginx

Minimum viable unprivileged configuration for testing

Config

events {}
pid /tmp/nginx.pid;
daemon off;
http {
    access_log /dev/stdout;
    error_log  /dev/stderr info;

    # Change default paths to allow running as unprivileged
    proxy_temp_path /tmp/proxy_temp;
    client_body_temp_path /tmp/client_temp;
    fastcgi_temp_path /tmp/fastcgi_temp;
    uwsgi_temp_path /tmp/uwsgi_temp;
    scgi_temp_path /tmp/scgi_temp;

    server {
        server_name "";
        listen 8000;

        location / {
            proxy_pass http://google.com;
        }
    }
}

Run it with

nginx -p. -e stderr -c nginx.conf

Clean single nginx entry

Find the file in /var/cache/nginx/dpa

grep -lrP 'some.+word.+2019\-04\-02' .

This works because nginx stores original request.

To delete cache files:

grep -lrP 'some.+word.+2019\-04\-02' . | xargs rm -f