Welcome! Log In Create A New Profile

Advanced

Nginx ssl 443 conf help !

Posted by kevinrichard 
Nginx ssl 443 conf help !
February 03, 2022 06:20AM
Hello I need your help guys ! I'm totally lost
I have my site working in http but not in https
When I go to https it goes to another site I own, I think there is a problem in the nginx file but I don't know where to find it
thank you in advance





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;
}
}
Re: Nginx ssl 443 conf help !
February 03, 2022 06:35AM
>> proxy_pass http://0.0.0.0:2300;

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: Nginx ssl 443 conf help !
February 03, 2022 11:32AM
Re: Nginx ssl 443 conf help !
February 03, 2022 02:19PM
Thank you man, it works
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready