Bonjour à toutes et à tous,

Je débute avec nginx.
J'essaye de mettre en place du https, la partie http fonctionne bien.
Mon problème c'est que lorsque j'accède à la page en https, mon navigateur (firefox) cherche à télécharger un truc et n'ouvre pas la page???

Auriez-vous une idée?

d'avance merci de l'iade que vous pourrez m'apporter.
Bonjour,

nginx est il compatible avec apache2 ?

J'ai un dédié avec Debian 8, administré avec Webmin, apache2 fonctionne bien mais je me demande les interractions négatives possibles si j'ajoute nginx.

A la base je me demande ça pour trouver une altérnative plus légère à Plex, donc si je dis pas de bétises Cakebox qui tourne avec nginx.
@Manitas Je suis désolé mais je ne connais pas assez nginx pour t'aider . D'autres pourront mais je te conseille de créer un post , ça sera plus visible et tu auras des retours dont tout le monde profitera .

@mrglobule Essaye de créer un certificat avec Let's Enscrypt pour tester , sinon post le fichier de conf où tu intègres ton certificat , ça permettra de voir si tu as un soucis dessus.
server {
   listen 80;
   server_name     wa.accary.net;
   root            /var/www/rainloop;
   index           index.php;
   charset         utf-8;

   location ^~ /data {
      deny all;
   }

   location / {
      try_files $uri $uri/ index.php;
   }

   location ~* \.php$ {
        include       /etc/nginx/fastcgi_params;
        fastcgi_pass  unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   }
}


server {
    listen 443 ssl;
    server_name wa.accary.net;
    root /var/www/rainloop;
    index index.php;
    charset utf-8;

    ssl on;
    ssl_certificate /etc/ssl/nginx/accary.net.crt-unified;
    ssl_certificate_key /etc/ssl/nginx/accary.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers "EECDH+AESGCM:AES128+EECDH:AES256+EECDH";

    ssl_prefer_server_ciphers on;
    ssl_ecdh_curve secp384r1;

    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;

    ssl_stapling        on;
    ssl_stapling_verify on;

    resolver 8.8.4.4 8.8.8.8 valid=300s;
    resolver_timeout 10s;

   add_header X-Frame-Options "DENY";
   add_header X-Content-Type-Options "nosniff";
}
Ce qui est étrange c'est que lorsque je teste ma config sur ssllabs j'obtiens un A
Ca veut dire que ton certificat est valide donc.
C'est quoi le message qui apparaît sur ton naviateur ?
Bonjour,
personne n'a une petite idée?
d'avance merci.
Bonjour,
alors je me réponds après avoir trouvé la solution...
Il fallait recopier toutes les directives Location dans le second server...

Suis-je bête.

Allez @+
Salut !

Tu as un seul fichier de configuration ?
Pourrais-tu me montrer ça ?

En fait, j'ai du https sur mon serveur moi aussi. Et je voudrais exclure la racine de mon /www. Par contre, les sous dossiers /www/rutorrent, /www/seedbox-manager, etc les laisser en https.

Ma configuration est vraiment bizarre mais je crois qu'elle fonctionne. Pourtant, j'ai du mal a obtenir un A

Merci d'avance !
CLusmi wrote:Salut !

Tu as un seul fichier de configuration ?
Pourrais-tu me montrer ça ?

Enfaite, j'ai du https sur mon serveur moi aussi. Et je voudrais exclure la racine de mon /www. Par contre, les sous dossiers /www/rutorrent, /www/seedbox-manager, etc les laisser en https.

Ma configuration est vraiment bisare mais je crois qu'elle fonctionne. Pourtant, j'ai du mal a obtenir un A

Merci d'avance !
en gros tu veux du https pour tout sauf pour location / ?

si oui link ta config
Voila, c'est exactement ce que je recherche !

mon rutorrent.conf :
server {
    listen 80;
    server_name ndd.ovh;
    return 301 https://$server_name$request_uri;
}

server {
	listen 443 ssl;
	server_name ndd.ovh;
	ssl_certificate /etc/letsencrypt/live/ndd.ovh/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ndd.ovh/privkey.pem;

	index index.html index.php;
	charset utf-8;
	client_max_body_size 10G;

	include /etc/nginx/conf.d/ciphers.conf;

	access_log /var/log/nginx/rutorrent-access.log combined;
	error_log /var/log/nginx/rutorrent-error.log error;

	error_page 500 502 503 504 /50x.html;
	location = /50x.html { root /usr/share/nginx/html; }

	auth_basic "Private - Seedbox-Manager";
	auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";

	location = /favicon.ico {
		access_log off;
		log_not_found off;
}	
	
###########################################################################################
## debut config ndd.ovh ##

	location ^~ / {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;
	    satisfy any;
	    allow all;
		autoindex on;
	}
	
## fin config ndd.ovh ##
###########################################################################################
## debut config ndd.ovh/rutorrent ##

	location ^~ /rutorrent {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;

	    location ~ /\.svn {
		    deny all;
	    }

	    location ~ /\.ht {
		    deny all;
	    }
	}

	location ^~ /rutorrent/conf/ {
		deny all;
	}
	location ^~ /rutorrent/share/ {
		deny all;
	}
	
## fin config ndd.ovh/rutorrent ##
###########################################################################################
## debut config ndd.ovh/seedbox-manager ##

    location ^~ /seedbox-manager {
        alias /var/www/seedbox-manager/public;
        include /etc/nginx/conf.d/php-manager.conf;
        include /etc/nginx/conf.d/cache.conf;
    }
	
## fin config ndd.ovh/seedbox-manager ##
###########################################################################################
J'ai peut etre meme un ou deux autres dossiers a ne pas mettre en https, mais je prendrais exemple sur ton model !

Merci
à priori
server {
    listen 80;
    server_name ndd.ovh;
## debut config ndd.ovh ##

	location ^~ / {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;
	    satisfy any;
	    allow all;
		autoindex on;
	}
	
## fin config ndd.ovh ##
    return 301 https://$server_name$request_uri;
}

server {
	listen 443 ssl;
	server_name ndd.ovh;
	ssl_certificate /etc/letsencrypt/live/ndd.ovh/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ndd.ovh/privkey.pem;

	index index.html index.php;
	charset utf-8;
	client_max_body_size 10G;

	include /etc/nginx/conf.d/ciphers.conf;

	access_log /var/log/nginx/rutorrent-access.log combined;
	error_log /var/log/nginx/rutorrent-error.log error;

	error_page 500 502 503 504 /50x.html;
	location = /50x.html { root /usr/share/nginx/html; }

	auth_basic "Private - Seedbox-Manager";
	auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";

	location = /favicon.ico {
		access_log off;
		log_not_found off;
}	
	
###########################################################################################
###########################################################################################
## debut config ndd.ovh/rutorrent ##

	location ^~ /rutorrent {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;

	    location ~ /\.svn {
		    deny all;
	    }

	    location ~ /\.ht {
		    deny all;
	    }
	}

	location ^~ /rutorrent/conf/ {
		deny all;
	}
	location ^~ /rutorrent/share/ {
		deny all;
	}
	
## fin config ndd.ovh/rutorrent ##
###########################################################################################
## debut config ndd.ovh/seedbox-manager ##

    location ^~ /seedbox-manager {
        alias /var/www/seedbox-manager/public;
        include /etc/nginx/conf.d/php-manager.conf;
        include /etc/nginx/conf.d/cache.conf;
    }
	
## fin config ndd.ovh/seedbox-manager ##
###########################################################################################
tout simplement
Maintenant, quand je vais sur "ndd.ovh", il me demande les logs de seedbox-manager.

Et meme si je les rentres, j'ai rien derriere qui fonctionne, toujours du "404 not found" sur tous mes dossiers.

Merci a toi
avec ca alors :
server {
	listen 80;
	server_name ndd.ovh;

	index index.html index.php;
	charset utf-8;
	client_max_body_size 10G;

	access_log /var/log/nginx/rutorrent-access.log combined;
	error_log /var/log/nginx/rutorrent-error.log error;

	error_page 500 502 503 504 /50x.html;
	location = /50x.html { root /usr/share/nginx/html; }

	auth_basic "Private - Seedbox-Manager";
	auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";

	location = /favicon.ico {
		access_log off;
		log_not_found off;
}	
	
###########################################################################################
	location ^~ / {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;
	    satisfy any;
	    allow all;
		autoindex on;
	}
###########################################################################################
## debut config ndd.ovh/rutorrent ##

	location ^~ /rutorrent {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;

	    location ~ /\.svn {
		    deny all;
	    }

	    location ~ /\.ht {
		    deny all;
	    }
	}

	location ^~ /rutorrent/conf/ {
		deny all;
	}
	location ^~ /rutorrent/share/ {
		deny all;
	}
	
## fin config ndd.ovh/rutorrent ##
###########################################################################################
## debut config ndd.ovh/seedbox-manager ##

    location ^~ /seedbox-manager {
        alias /var/www/seedbox-manager/public;
        include /etc/nginx/conf.d/php-manager.conf;
        include /etc/nginx/conf.d/cache.conf;
    }
	
## fin config ndd.ovh/seedbox-manager ##
###########################################################################################
server {
	listen 443 ssl;
	server_name ndd.ovh;
	ssl_certificate /etc/letsencrypt/live/ndd.ovh/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ndd.ovh/privkey.pem;

	index index.html index.php;
	charset utf-8;
	client_max_body_size 10G;

	include /etc/nginx/conf.d/ciphers.conf;

	access_log /var/log/nginx/rutorrent-access.log combined;
	error_log /var/log/nginx/rutorrent-error.log error;

	error_page 500 502 503 504 /50x.html;
	location = /50x.html { root /usr/share/nginx/html; }

	auth_basic "Private - Seedbox-Manager";
	auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";

	location = /favicon.ico {
		access_log off;
		log_not_found off;
}	
	
###########################################################################################
###########################################################################################
## debut config ndd.ovh/rutorrent ##

	location ^~ /rutorrent {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;

	    location ~ /\.svn {
		    deny all;
	    }

	    location ~ /\.ht {
		    deny all;
	    }
	}

	location ^~ /rutorrent/conf/ {
		deny all;
	}
	location ^~ /rutorrent/share/ {
		deny all;
	}
	
## fin config ndd.ovh/rutorrent ##
###########################################################################################
## debut config ndd.ovh/seedbox-manager ##

    location ^~ /seedbox-manager {
        alias /var/www/seedbox-manager/public;
        include /etc/nginx/conf.d/php-manager.conf;
        include /etc/nginx/conf.d/cache.conf;
    }
	
## fin config ndd.ovh/seedbox-manager ##
###########################################################################################
Non plus

Ce que je cherche a faire :

ndd.ovh - sans login et sans SSL
ndd.ovh/seedbox-manager - avec login et avec SSL
ndd.ovh/rutorrent - avec login et avec SSL
ndd.ovh/exemple/dossier - sans login et sans SSL

Oula, j'suis d'un compliqué ^^
Répondre…