i am trying to configure ssl on nginx server but it show me the wrong directory.. http on port 80 is ok, https on 443 no
this is my formazioneturismo.com.vhost
fastcgi_cache_path /var/nginx-cache/formazioneturismo.com levels=1:2 keys_zone=$
server {
listen 443 ssl;
server_name formazioneturismo.com www.formazioneturismo.com;
ssl_certificate /etc/nginx/ssl/formazioneturismo.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
return 301 https://www.formazioneturismo.com$request_uri;
}
server {
listen *:80;
server_name formazioneturismo.com www.formazioneturismo.com;
root /var/www/formazioneturismo.com/web;
index index.php;
error_log /var/www/formazioneturismo.com/log/error.log;
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
set $skip_cache 0;
if ($request_method = POST) {
set $skip_cache 1;
}
if ($query_string != "") {
set $skip_cache 1;
}
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|sitemap$
set $skip_cache 1;
}
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wor$
set $skip_cache 1;
}
location / {
try_files $uri $uri/ /index.php?$args;
proxy_read_timeout 300;
}
location ~ \.php$ {
try_files /554f0f259d7888e056db62d833113342.htm @php;
}
location @php {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/lib/php5-fpm/web1.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
fastcgi_cache WORDPRESS_formazioneturismo.com;
fastcgi_cache_valid 1440m;
}
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jp$
access_log off; log_not_found off; expires max;
}
}
As you can check going to http://www.formazioneturismo.com you normally see the website, if you go to https://www.formazioneturismo.com i see the default nginx page