Report this

What is the reason for this report?

Setup nginx conf 443ssl not loading the good website

Posted on February 3, 2022

hello guys I got two website on one ubuntu server I have two conf files in nginx : website1.conf website2.conf

website1 works website2 works partially only http works but not https

Setup nginx conf 443ssl not loading the good website. if you can help me

server {
    listen 80;
    server_name manonbarre.fr www.manonbarre.fr;
    root /site/manonbarre;
    index index.php index.html index.htm;
}




server {
    listen *:443 ssl;

    ssl on;
    # Use certificate and key provided by Let's Encrypt:
    ssl_certificate /etc/letsencrypt/live/manonbarre.fr/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/manonbarre.fr/privkey.pem;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';



location / {
    #resolve using Google's DNS server to force DNS resolution and prevent caching of IPs
    resolver 8.8.8.8;

    # Proxy_pass configuration
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-NginX-Proxy true;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_max_temp_file_size 0;
    proxy_pass http://0.0.0.0:2300;
    proxy_redirect off;
    proxy_read_timeout 240s;
proxy_hide_header 'Cache-Control';
add_header Cache-Control no-cache;
expires 1d;
                                

    }

    
        location /phpmyadmin {
        root /usr/share/;
        index index.php index.html index.htm;
        
        location ~ ^/phpmyadmin/(.+\.php)$ {
            try_files $uri =404;
            root /usr/share/;
            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi_params;
        }

        location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
            root /usr/share/;
        }
    }

    location /phpMyAdmin {
        rewrite ^/* /phpmyadmin last;
    }
}

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.