serve static content on static domain

zuckbin nginx-forum at
Fri Apr 6 13:41:59 UTC 2012


How to serve static content on static domain cookieless.

I use ngix to serve static content then apache to dynamic content.

Want to serve on all static content: jpeg, css, js,

Here my actual conf:

	server {
		listen 80;
		client_max_body_size 50M;
		access_log /var/log/nginx/localhost.access_log main;
		error_log /var/log/nginx/localhost.error_log info;
	location / {
            proxy_pass http://IP:8080/;
		proxy_redirect default;
	proxy_set_header Host $host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

	location ~*
            root   /home/www/;
			expires 30d;
			add_header Pragma public;
			add_header Cache-Control "public";

Want all my static content will be delivered only with:
(no duplicate content)

Thanks for your help

Posted at Nginx Forum:,225020,225020#msg-225020

More information about the nginx mailing list