Welcome! Log In Create A New Profile

Advanced

Re: NGINX redirection issue

August 07, 2014 12:02PM
Hello Maxim,

Thank you for your response. Here is the my nginx settings

**************my NGINX.conf********************
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
worker_rlimit_nofile 30000;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format combined_time '$remote_addr - $remote_user [$time_local]'
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time';

access_log /var/log/nginx/access.log combined_time;
include /etc/nginx/servers/*.conf;
}
**********************************************

******************************VHOST SETTING*****
server {
listen 80;
server_name www-aaa.com;
add_header Cache-Control off;
expires 1d;
root /var/empty;
error_log /var/log/nginx/www.aaa.com-error.log;
access_log /var/log/nginx/www.aaa.com-access.log combined_time;
location = /favicon.ico {
root /www;
}
proxy_intercept_errors on;
error_page 400 401 402 403 404 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 = /error_page.pl;
error_page 405 =200 $uri;
location /error_page.pl {
fastcgi_pass 127.0.0.1:8999;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_pass_header "Status";
}

location / {
## Rewrite root to index of bbb folder.
rewrite ^/$ http://www.aaa.com/aaaa/bbb/index.html permanent;
## Rewrite all directory lookups to 'index.html'
rewrite ^(.*)/$ $1/index.html permanent;
## Rewrite all open strings to index.html
rewrite ^(.*)/([^\.\?/]+)$ $1/$2/index.html permanent;
proxy_redirect off;
proxy_set_header Host www.aaa.com.s3.amazonaws.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer www.aaa.com;
proxy_pass http://www.aaa.com.s3.amazonaws.com/;
}
}
Subject Author Posted

NGINX redirection issue

manish-ezest August 06, 2014 11:37PM

Re: NGINX redirection issue

Maxim Dounin August 07, 2014 04:06AM

Re: NGINX redirection issue

manish-ezest August 07, 2014 12:02PM

Re: NGINX redirection issue

manish-ezest August 08, 2014 06:01AM

Re: NGINX redirection issue

Maxim Dounin August 08, 2014 10:52AM

Re: NGINX redirection issue

manish-ezest August 08, 2014 10:49PM

Re: NGINX redirection issue

Maxim Dounin August 09, 2014 09:12PM

Re: NGINX redirection issue

manish-ezest August 29, 2014 04:05AM

Re: NGINX redirection issue

Maxim Dounin August 30, 2014 10:48PM

Re: NGINX redirection issue

manish-ezest September 01, 2014 02:05PM

Re: NGINX redirection issue

Maxim Dounin September 02, 2014 10:00AM

Re: NGINX redirection issue

manish-ezest September 03, 2014 03:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
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