<div>Here it is:</div>
<div> </div>
<div>If there is any other prob that anyone finds with this config, please let me know.</div>
<div> </div>
<div>Thanks,</div>
<div>Rakesh.</div>
<div>=====================START=====================</div>
<div>#user nobody;<br>worker_processes 1;</div>
<div>#error_log logs/error.log;<br>#error_log logs/error.log notice;<br>#error_log logs/error.log info;</div>
<div>#pid logs/nginx.pid;</div>
<div><br>events {<br> worker_connections 1024;<br>}</div>
<div><br>http {<br> include mime.types;<br> default_type application/octet-stream;</div>
<div> #log_format main '$remote_addr - $remote_user [$time_local] $request '<br> # '"$status" $body_bytes_sent "$http_referer" '<br> # '"$http_user_agent" "$http_x_forwarded_for"';</div>
<div> #access_log logs/access.log main;</div>
<div> sendfile on;<br> #tcp_nopush on;</div>
<div> #keepalive_timeout 0;<br> keepalive_timeout 65;</div>
<div> gzip on;<br>gzip_http_version 1.0;<br>gzip_min_length 1100;<br>gzip_comp_level 2;<br>gzip_proxied any;<br>gzip_vary on;<br>gzip_types text/plain text/html text/css text/xml application/x-javascript application/pdf application/xml application/\<br>
xml+rss text/javascript;<br>gzip_disable "MSIE [1-6]\.";<br>#gzip_buffers 128 8k;</div>
<div> server {<br> listen 80;<br> server_name localhost;</div>
<div> #charset koi8-r;</div>
<div> #access_log logs/host.access.log main;</div>
<div> location / {<br> root html/mysite;<br> index index.html index.htm view.html;<br> error_page 404 = @jetty;<br> }</div>
<div>location /testsite/ {<br> root /usr/local/nginx/html;<br> index index.html view.html /view.html;<br> error_page 404 = @jetty;<br>}</div>
<div> location @jetty {<br> proxy_pass <a href="http://127.0.0.1:8080/">http://127.0.0.1:8080</a>;<br> }</div>
<div> #error_page 404 /404.html;</div>
<div> # redirect server error pages to the static page /50x.html<br> #<br> error_page 500 502 503 504 /50x.html;<br> location = /50x.html {<br> root html;<br> }<br> </div>
<div> location ~* ^.+\.(jsp|json)*$ {<br> proxy_pass <a href="http://127.0.0.1:8080/">http://127.0.0.1:8080</a>;<br> #proxy_redirect false;<br> include /usr/local/nginx/conf/proxy.conf;<br>
}</div>
<div><br> location ~ /bind$<br> {<br> proxy_pass <a href="http://127.0.0.1:8080/">http://127.0.0.1:8080</a>;<br> include /usr/local/nginx/conf/proxy.conf;<br> }</div>
<div> location /testsite/images/store/<br> {<br> proxy_pass <a href="http://127.0.0.1:8080/">http://127.0.0.1:8080</a>;<br> include /usr/local/nginx/conf/proxy.conf;<br> }</div>
<div><br> location ~ /\.ht {<br> deny all;<br> }<br> }<br>}<br></div>
<div>==========THE END==========<br><br></div>
<div class="gmail_quote">On Feb 18, 2008 4:01 PM, Denis F. Latypoff <<a href="mailto:denis@gostats.ru">denis@gostats.ru</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello just,<br>
<div>
<div></div>
<div class="Wj3C7c"><br>Monday, February 18, 2008, 4:26:04 PM, you wrote:<br><br>> hi,<br><br>> When I dont put a trailing '/', the testsite is redirecting me to localhost.<br><br>> conf file snippet:<br>
> location /testsite/ {<br>> root /usr/local/nginx/html;<br>> index index.html view.html /view.html;<br>> error_page 404 = @jetty;<br>> }<br><br>> Now when I enter <a href="http://www.mysite.com/testsite/" target="_blank">www.mysite.com/testsite/</a> it works fine, but when I try<br>
> <a href="http://www.mysite.com/mysite" target="_blank">www.mysite.com/mysite</a> it redirects me to <a href="http://localhost/testsite/" target="_blank">http://localhost/testsite/</a><br><br>> What is the problem here.<br>
<br>> If you cant come to any conclusion without looking at the conf file let me<br>> know, I will copy it.<br><br></div></div>yes, it would be good if you copy it.<br><br>> Thanks,<br>> Rakesh.<br><font color="#888888"><br>
<br>--<br>Best regards,<br> Denis mailto:<a href="mailto:denis@gostats.ru">denis@gostats.ru</a><br><br><br></font></blockquote></div><br>