The HTTPS request
https://www.xxx.jp/tida/test.jpg
is being interpreted as
/usr/share/nginx/html/tida/test.jpg
in
2014/01/08 15:38:27 [error] 29388#0: *90 open()
"/usr/share/nginx/html/tida/test.jpg" failed (2: No such file or
directory), client: xx.xx.xx.xx, server: www.xxx.jp, request: "GET
/tida/test.jpg HTTP/1.1", host: "www.xxx.jp"
The HTTP request
http://www.xxx.jp/tida/test.jpg
Is being interpreted as
/var/nginx/tida/test.jpg
In
xx.xx.xx.xx - - [08/Jan/2014:15:38:27 +0900] "GET /tida/test.jpg HTTP/1.1"
404 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:26.0)
Gecko/20100101 Firefox/26.0"
So it looks like nginx is correctly recognizing the root directory of
/var/nginx/
For http but not for https, because https requests are being given root of
/usr/share/nginx/html/
The conf file contains
include /etc/nginx/conf.d/*.conf;
and the ssl.conf file is
server {
listen 443 ssl;
server_name www.xxx.jp;
ssl_certificate /etc/ssl/certs/www.xxx.jp.cer;
ssl_certificate_key /etc/ssl/certs/www.xxx.jp.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
root /var/nginx/;
location / {
root html;
index index.html index.htm;
}
}
I think the root directive is not being processed. How can I get nginx to do HTTPS correctly?
https://www.xxx.jp/tida/test.jpg
is being interpreted as
/usr/share/nginx/html/tida/test.jpg
in
2014/01/08 15:38:27 [error] 29388#0: *90 open()
"/usr/share/nginx/html/tida/test.jpg" failed (2: No such file or
directory), client: xx.xx.xx.xx, server: www.xxx.jp, request: "GET
/tida/test.jpg HTTP/1.1", host: "www.xxx.jp"
The HTTP request
http://www.xxx.jp/tida/test.jpg
Is being interpreted as
/var/nginx/tida/test.jpg
In
xx.xx.xx.xx - - [08/Jan/2014:15:38:27 +0900] "GET /tida/test.jpg HTTP/1.1"
404 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:26.0)
Gecko/20100101 Firefox/26.0"
So it looks like nginx is correctly recognizing the root directory of
/var/nginx/
For http but not for https, because https requests are being given root of
/usr/share/nginx/html/
The conf file contains
include /etc/nginx/conf.d/*.conf;
and the ssl.conf file is
server {
listen 443 ssl;
server_name www.xxx.jp;
ssl_certificate /etc/ssl/certs/www.xxx.jp.cer;
ssl_certificate_key /etc/ssl/certs/www.xxx.jp.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
root /var/nginx/;
location / {
root html;
index index.html index.htm;
}
}
I think the root directive is not being processed. How can I get nginx to do HTTPS correctly?