server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name public;
root /var/www/public;
location = /gameserver/
{
root /var/www/public/gameserver;
index index.html;
if ($request_filename !~* [pk3]$)
{
rewrite ^ /404.html;
}
}
}
I'm new to Nginx and I've been trying for a few hours now (google and reading the manual) but i cant figure out how to deny all file extensions except the .pk3 with nginx.
the /var/www/gameserver/ points to a symbiotic link from where i only want the .pk3's downloadable.
This is going to be a small gameserver for some fun with friends, no money involved.
Thanks for your time,
Vitali