server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /PATH/TO/ROMPR; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location /rompr { allow all; index index.php; client_max_body_size 32M; location ~ \.php { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; include /etc/nginx/fastcgi_params; } error_page 404 = /rompr/404.php; try_files $uri $uri/ =404; location ~ /rompr/albumart/* { expires -1s; } } }