_GET parameters with question and ampersand

arnas nginx-forum at nginx.us
Mon Apr 14 09:03:32 UTC 2014


Hi,

I am wondering how do I solve parameters being passed correctly after
switching from apache.

http://app.mailerlite2.com/test/test_get/?labas=testarg NOT passing
http://app.mailerlite2.com/test/test_get/&labas=testarg PASS

# 1 server, proxy passes to internal server #2

server {
	listen X.X.X.X:80;
	server_name  _;

    location / {
	proxy_pass http://192.168.53.30;
	proxy_set_header Host $host;
	proxy_set_header X-Real-IP        $remote_addr;
	proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto $scheme;
    }
}

# 2 server
server {
	listen       192.168.53.30:80;
	server_name ~^(?P<subdomain>.+)\.mailerlite2.com;
        root    /var/www/html/mailerlite2/public_html;
        index   index.php;
        try_files $uri $uri/ $uri/index.php /index.php;
        
        access_log /var/log/nginx/access.log;
	client_max_body_size  300M;
		
        location ~* /data/emails/ {
                root /var/www/html;
			expires 7d; access_log off;
			add_header Cache-Control "public";
			location ~* \.php$ {return 403;}
        }
		location ~* "^/data/custom_html" {
			root /var/www/html;
			location ~* \.php$ {return 403;}
		}

        location ~ \.php$ {
                try_files $uri =404;
                include fastcgi.conf;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_param SCRIPT_FILENAME
document_root$fastcgi_script_name;
                include fastcgi_params;
        }
        location ~ /\. {
                deny all;
        }
        location / {

        # Directives to send expires headers and turn off 404 error
logging.
        location ~*
^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$
{
                root    /var/www/html/mailerlite2/public_html;
                expires max; access_log off; log_not_found off;
		add_header Cache-Control "public";
        }
        location ~* ^.+\.(css|js)$ {
                root    /var/www/html/mailerlite2/public_html;
                expires 72h; access_log off;
		add_header Cache-Control "public";
        }
}

http://p.ngx.cc/170041499f94175e

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,249267,249267#msg-249267



More information about the nginx mailing list