Welcome! Log In Create A New Profile

Advanced

Re: serve static content on static domain

April 11, 2012 03:06AM
ok, can i do this ?


server {
listen ip:80;
server_name yourserver.com;
root /srv/http/nginx/yourserver.com;
access_log logs/yourserver.com.access.log;
location / {
index index.html;
charset utf-8;
}

}

}

server {
listen ip:80;
server_name static.static-yourserver.com;
root /srv/http/nginx/yourserver.com;
location / {
if ($request_filename ~ "\.(jpg|css|gif|png|swf|ico|mp3)$") {
break;
}
return 404;
}
}
Subject Author Posted

serve static content on static domain

zuckbin April 06, 2012 09:41AM

Re: serve static content on static domain

Edho Arief April 06, 2012 09:48AM

Re: serve static content on static domain

zuckbin April 10, 2012 03:47AM

Re: serve static content on static domain

Valentin V. Bartenev April 10, 2012 04:54AM

Re: serve static content on static domain

zuckbin April 11, 2012 03:06AM

Re: serve static content on static domain

Valentin V. Bartenev April 11, 2012 06:32AM

Re: serve static content on static domain

Valentin V. Bartenev April 11, 2012 06:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 99
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready