и еще - зачем первым параметром в внутри location mp4 - повторяется "mp4;"
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /dp/ {
auth_basic "closed site";
auth_basic_user_file /home/local/html/.htpasswd;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
root ~/test_app/public;
у RoR index.html вообще есть?
yourserver.com
или назначить виртуал хост как default.yourserver.com
в hosts вашей OS server {
listen 443 ssl default_server;
server_name exemple.com;
ssl on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_certificate /path_to/exemple.crt;
ssl_certificate_key /path_to/exemple.key;
ssl_ciphers 'HIGH:!aNULL:!MD5:!kEDH';
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/nginx/cert/ca-certs.pem;
server{
listen 80 default_server;
server_name exemple.com;
rewrite ^(/.*)$ https://$host$1 permanent;
}
curl -v http://host
< HTTP/1.1 200 OK
< Server: nginx/1.4.6 (Ubuntu)
< Date: Wed, 05 Aug 2015 10:50:37 GMT
< Content-Type: text/html
< Content-Length: 33118
< Last-Modified: Mon, 13 Jul 2015 12:23:35 GMT
< Connection: keep-alive
< ETag: "55a3adc7-815e"
< Expires: Thu, 06 Aug 2015 10:50:37 GMT
< Cache-Control: max-age=86400
< Strict-Transport-Security: max-age=31536000; includeSubdomains;
< Accept-Ranges: bytes
curl -v -H "If-Modified-Since: Mon, 13 Jul 2015 12:23:35 GMT" http://host
< HTTP/1.1 304 Not Modified
< Server: nginx/1.4.6 (Ubuntu)
< Date: Wed, 05 Aug 2015 10:52:03 GMT
< Last-Modified: Mon, 13 Jul 2015 12:23:35 GMT
< Connection: keep-alive
< ETag: "55a3adc7-815e"
< Expires: Thu, 06 Aug 2015 10:52:03 GMT
< Cache-Control: max-age=86400
< Strict-Transport-Security: max-age=31536000; includeSubdomains;