Welcome! Log In Create A New Profile

Advanced

nginx and cscart

June 25, 2011 03:29AM
hi,
i asked this question in other topics but did not get the complete solution yet.
many problems solved but one final of pice of puzzle is still unsolved;

we want to use nginx in front of three cs cart web servers;
one server is for images(192.168.1.3) and two others(192.168.1.1, 192.168.1.2) for web site files of cscart..
this is my complete config so far :

user nginx nginx;
worker_processes 4;
error_log var/log/error.log;
pid var/run/nginx.pid;
events {
worker_connections 4098;
}
http {
keepalive_timeout 65;
include mime.types;

default_type application/octet-stream;
sendfile on;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/xml text/css;
gzip_disable "MSIE [1-6]\.";

upstream mysites_hash {
ip_hash;
server 192.168.1.1;
server 192.168.1.2 down;
}
upstream myimages {
server 192.168.1.3;
}

server {
listen 80;
server_name www.mydomain.com;
location / {
deny all;
}
location /csupdate/images {
proxy_pass http://myimages/images;
}
location /csupdate {
proxy_pass http://mysites_hash/csupdate;
proxy_set_header Host 192.168.1.1;
proxy_redirect http://192.168.1.1/csupdate http://www.mydomain.com/csupdate;

}
location /nginx_status {
stub_status on;
access_log off;
allow my_own_ip-address;
deny all;
}
}

}


some notes :
1. cs cart has a setion in its config that i have to add server address and also some path
for example i have to define 192.168.1.1 and also define "csupdate" (csupdate is a virtual address of my site under 192.168.1.1 or 192.168.1.2); then cscart redirect users to this address so it does some redirection so i need to use proxy_redirect ang proxy_set_header as above;

2. the above config is working fine because i set the 2th server down (192.168.1.2) and use 1th server address manually
in my /csupdate location but i can not enable my 2th server because i don't know how to config my csupdate location

is there any thing i can do for this problem ???

thank you in advance;
Subject Author Posted

nginx and cscart

torajx June 25, 2011 03:29AM

Re: nginx and cscart

torajx June 27, 2011 01:04AM

Re: nginx and cscart

Reinis Rozitis June 27, 2011 05:10AM

Re: nginx and cscart

torajx June 27, 2011 05:54AM

Re: nginx and cscart

torajx June 27, 2011 05:56AM

Re: nginx and cscart

torajx July 02, 2011 02:32AM

Re: nginx and cscart

torajx July 02, 2011 02:41AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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