trailing / problem

just starting just.starting at gmail.com
Mon Feb 18 14:10:37 MSK 2008


Here it is:

If there is any other prob that anyone finds with this config, please let me
know.

Thanks,
Rakesh.
=====================START=====================
#user  nobody;
worker_processes  1;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       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"';
    #access_log  logs/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;
    gzip  on;
gzip_http_version 1.0;
gzip_min_length  1100;
gzip_comp_level 2;
gzip_proxied any;
gzip_vary on;
gzip_types       text/plain text/html text/css text/xml
application/x-javascript application/pdf application/xml application/\
xml+rss text/javascript;
gzip_disable "MSIE [1-6]\.";
#gzip_buffers 128 8k;
    server {
        listen       80;
        server_name  localhost;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
            root   html/mysite;
            index  index.html index.htm view.html;
            error_page 404 = @jetty;
        }
location /testsite/ {
       root /usr/local/nginx/html;
       index index.html view.html /view.html;
       error_page 404 = @jetty;
}
        location @jetty {
                proxy_pass http://127.0.0.1:8080;
        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location ~* ^.+\.(jsp|json)*$ {
                proxy_pass http://127.0.0.1:8080;
                #proxy_redirect false;
                include /usr/local/nginx/conf/proxy.conf;
        }

        location ~ /bind$
        {
                proxy_pass http://127.0.0.1:8080;
                include /usr/local/nginx/conf/proxy.conf;
        }
        location /testsite/images/store/
        {
                proxy_pass http://127.0.0.1:8080;
                include /usr/local/nginx/conf/proxy.conf;
        }

        location ~ /\.ht {
            deny  all;
        }
    }
}
==========THE END==========

On Feb 18, 2008 4:01 PM, Denis F. Latypoff <denis at gostats.ru> wrote:

> Hello just,
>
> Monday, February 18, 2008, 4:26:04 PM, you wrote:
>
> > hi,
>
> > When I dont put a trailing '/', the testsite is redirecting me to
> localhost.
>
> > conf file snippet:
> > location /testsite/ {
> >        root /usr/local/nginx/html;
> >        index index.html view.html /view.html;
> >        error_page 404 = @jetty;
> > }
>
> > Now when I enter www.mysite.com/testsite/ it works fine, but when I try
> > www.mysite.com/mysite it redirects me to http://localhost/testsite/
>
> > What is the problem here.
>
> > If you cant come to any conclusion without looking at the conf file let
> me
> > know, I will copy it.
>
> yes, it would be good if you copy it.
>
> > Thanks,
> > Rakesh.
>
>
> --
> Best regards,
>  Denis                            mailto:denis at gostats.ru
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080218/78e2a82b/attachment.html>


More information about the nginx mailing list