Welcome! Log In Create A New Profile

Advanced

nginx to serve static files (images)

Posted by theberserker 
nginx to serve static files (images)
November 05, 2010 01:42PM
Hi. I'm new to nginx and I just can't get this working - to all the static files i want to access (in this case of configuration - all images), i get 403 Forbidden error. File permissions on the server are ok for sure and this is from my only enabled site; nginx.config does nothing special with locations - it just includes enabled site


[code]
server {
location / {
index index.php index.html index.htm;

try_files $uri $uri/ /index.php?q=$uri&$args;
}

location ~ \.php$ {
include /etc/nginx/fastcgi_php;
}

location ~* \.(gif|jpg|jpeg|png) {
allow all;
}
}
[/code]
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 231
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready