server_name old-domain.com;
rewrite ^(.*)$ http://new-domain.com$1 permanent;
server_name old-domain.com;
rewrite ^(.*)$ http://new-domain.com$ redirect;
if ($request_method !~ ^(POST)$ ) {
if ($request_method !~ ^(GET|POST)$ ) {
if ($request_method ~ ^(DELETE)$ ) {
if ($remote_addr = xxx.xxx.xxx.xxx) {
ploxy_pass http://hogehoge1
if ($remote_addr = yyy.yyy.yyy.yyy) {
ploxy_pass http://hogehoge2
if ($remote_addr ~* xxx\.xxx\.xxx\.*) {
ploxy_pass http://hogehoge1
if ($remote_addr ~* yyy\.yyy\.yyy\.*) {
ploxy_pass http://hogehoge2