mardi 10 octobre 2017

Nginx ERR_CONNECTION_RESET only one domain name

Problem Other sites work with exactly the same configuration, but one site is different and does not work. Browser outputs ERR_CONNECTION_RESET. Nginx logs 6819 # 0: signal process started. If you change server _name to another domain then everything works. Help someone who came across. Thank you.

My config nginx:

server {
    server_name  example.com *.example.com;
    listen 80;
    return 301 https://$host$request_uri;
}

server {
    server_name rentmycar.co *.rentmycar.co;
    listen       443 ssl http2;
    # resolver 8.8.8.8;
    root /usr/share/nginx/sites/example.com/html;
    keepalive_timeout  65;

    gzip on;
    gzip_disable "msie6";
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

    #autoindex on;
    index index.php index.html index.htm;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/http://ift.tt/1OCiVLJ;
    ssl_certificate_key /etc/letsencrypt/live/http://ift.tt/1LSjYB2;
    ssl_session_cache    shared:SSL:1m;
    ssl_session_timeout  5m;

    location ~ /.well-known {
        allow all;
    }

    error_page  404              /404.html;
    # proxy the PHP scripts to Apache listening on 127.0.0.1:8080
    #
    location ~ \.php$ {                      
    proxy_set_header Host            $host;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_pass   http://127.0.0.1:8080;
 }}




Aucun commentaire:

Enregistrer un commentaire