nginx 根目录无法正确转发

nginx 根目录无法正确转发

服务器文件存储在/var/www/

一切都运行正常,然后我收到以下错误

2011/01/28 17:20:05 [error] 15415#0: *1117703 "/var/www/https:/secure.domain.com/index.html" is not found (2: No such file or directory), client: 119.110.28.211, server: secure.domain.com, request: "HEAD /https://secure.domain.com/ HTTP/1.1", host: "secure.domain.com"

这是我的配置:

server {
    server_name secure.domain.com;
    listen       443;
    listen       [::]:443 default ipv6only=on;
    gzip                on;
    gzip_comp_level     1;
    gzip_types          text/plain text/html text/css application/x-javascript text/xml text/javascript;
    error_log           logs/ssl.error.log;
    gzip_static         on;
    gzip_http_version   1.1;
    gzip_proxied        any;
    gzip_disable        "msie6";
    gzip_vary           on;
    ssl                 on;
    ssl_ciphers         RC4:ALL:-LOW:-EXPORT:!ADH:!MD5;
    keepalive_timeout   0;
    ssl_certificate     /root/server.pem;
    ssl_certificate_key /root/ssl.key;

    location / {
        root   /var/www;
        index  index.html index.htm index.php;
    }
}

答案1

从 URL 中删除第一个斜杠:

/https://secure.domain.com/

正确的网址:

https://secure.domain.com/

相关内容