Trailing / problem

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.

Thanks,
Rakesh.

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 00server.com -- $0 setup fee and $0 monthly fee, free web page, free domain name, web site design, free web space, web page design, free web hosting, free e-mail, free web site, free web site hosting 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.

Hello just,

Monday, February 18, 2008, 5:10:37 PM, you wrote:

Here it is:

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

[…]

server {
    listen       80;
    server_name  localhost;
  •     server_name_id_redirect off;
    
    #charset koi8-r;
    #access_log  logs/host.access.log  main;

[…]

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==========

Hello Denis,

Monday, February 18, 2008, 5:21:33 PM, you wrote:

Hello just,

Monday, February 18, 2008, 5:10:37 PM, you wrote:

Here it is:

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

[…]

server {
    listen       80;
    server_name  localhost;
  •      server_name_id_redirect off;
    
  •      server_name_in_redirect off;
    
    #charset koi8-r;
    #access_log  logs/host.access.log  main;

[…]

Thanks to both Dennis and Denis :slight_smile:

This is funny

On Feb 18, 2008 5:00 PM, Denis F. Latypoff [email protected] wrote:

Hello Denis,

I was actually searching for the 2nd Denis and came to realise both are
the
same :stuck_out_tongue:

We have some really nice ppl here, helping each other at every stage.

Thanks a lot guys, keep it up.

Rakesh.