Do nginx do not auto differentiate the file name and directory name in the url?

ultrawind nginx-forum at nginx.us
Mon Mar 1 05:52:06 MSK 2010


dear all, i use Firefox to visit "http://localhost/myweb" , is also do not work.
here is my nginx.conf
user  daemon;
worker_processes  2;

#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;
    server_tokens off;

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /home/httpd/html;
            index  index.html index.htm index.php;
        }

        #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;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/httpd/html/$fastcgi_script_name;
            include        fastcgi_params;
        }

    }

}



here is the access.log record result
fail
192.168.1.19 - - [01/Mar/2010:10:42:33 +0800] "GET /myweb HTTP/1.1" 301 178 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trid
ent/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
success
192.168.1.19 - - [01/Mar/2010:10:44:18 +0800] "GET /myweb/ HTTP/1.1" 200 45696 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,57890,58466#msg-58466




More information about the nginx mailing list