• Serveurs
  • [Discussion] Certificat SSL signé et gratuit avec StartSSL {nginx}

Personne ne sait?
Sinon est ce que c'est possible de refaire toute la validation avec une clé de 4096 au lieu du 2048?
Car je crois qu'il faut faire la révocation mais 25$ par certificat, je préfère changer de site.
Je pense que tu peux récupérer le .crt mais pas la clé. Autrement, il faut révoquer les certificats et payer.
Ok. J'avais pourtant fais un fichier word avec mes clés mais il est vide.
Révoquer non trop chère.
Faut que j'aille ailleurs sinon.

edit: je vais attendre 4 mois plutôt et aller sur cacert par exemple en attendant.
Bonjour

Comment adapter ce tuto avec le script de Ex_rat ?

J'ai pour le moment :
server {
    listen 80 default_server;
    server_name _;

    rewrite ^ https://XXXXX$request_uri? permanent;
}

server {
        listen 443 ssl;
        server_name _;
        index index.html index.php;
        charset utf-8;
        client_max_body_size 10M;

        ssl_certificate /etc/nginx/ssl/server.crt;
        ssl_certificate_key /etc/nginx/ssl/server.key;

    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE

    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/ssl/dhparams.pem
 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 "seedbox";
        auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";

        location = /favicon.ico {
                access_log off;
                log_not_found off;
        }

        ## début config accueil serveur ##

        location ^~ / {
            root /var/www/base;
            include /etc/nginx/conf.d/php.conf;
            include /etc/nginx/conf.d/cache.conf;
            satisfy any;
            allow all;
        }

        ## fin config accueil serveur ##

        ## début config 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 ^~ /partage {
        root /var/www/base;
        include /etc/nginx/conf.d/php.conf;
        include /etc/nginx/conf.d/cache.conf;
        #On appelle h5ai
        index index.html index.php /_h5ai/server/php/index.php;
        #On autorise le listing des fichiers
        autoindex on;
        #Facultatif on utilise l'auth de rutorrent
        auth_basic "Vous devez vous authentifier";
        auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
}

location /sickbeard {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header Host $host;
                proxy_redirect off;
                rewrite ^/sickbeard(/.*)$ $1;
                if ($remote_user = "bibou") {
                        proxy_pass http://127.0.0.1:20001;
                        break;
                }
                if ($remote_user = "test") {
                        proxy_pass http://127.0.0.1:20002;
                        break;
                }
        }


        location ^~ /rutorrent/conf/ {
                deny all;
        }

        location ^~ /rutorrent/share/ {
                deny all;
        }

        ## fin config rutorrent ##
      ## début config munin ##

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

        location ^~ /graph/img {
            root /var/www;
            include /etc/nginx/conf.d/php.conf;
            include /etc/nginx/conf.d/cache.conf;
            error_log /dev/null crit;
        }

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

        ## fin config munin ##

        ## début config 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 seedbox-manager ##

        ## config utilisateurs  ##

        location /BIBOU {
            include scgi_params;
            scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
            auth_basic "seedbox";
            auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_bibou";
        }
}



;

Je peux remplacer :
        ssl_certificate /etc/nginx/ssl/server.crt;
        ssl_certificate_key /etc/nginx/ssl/server.key;
Par :
ssl_certificate /etc/nginx/keys/nomdedomaine.crt-unified;
ssl_certificate_key /etc/nginx/keys/nomdedomaine.key;
De plus est-ce que ma redirection https est bonne ? Car lorsque je tente d'accéder via le nom de domaine je n'ai pas de redirection faites sur le port 443 j'ai cette erreur :
Message d'erreur Nginx
12 jours plus tard
juste pour etre sur de bien comprendre, il faut créer un certificat gratuit pour chaque sous domaine, donc si j'ai mondomaine.td/seedbox-manager et mondomaine.tld/rutorrent, il me faut deux certificats distincts crées sur startssl?
Non.
Un domaine c'est : domaine.tld
Un sous domaine c'est : webmail.domaine.tld
19 jours plus tard
Testé et ça marche nickel Merci.
5 jours plus tard
Quand je veux me connecteur au site : auth.startssl.com la connection échoue..
ça le fait que pour moi ?
joyel2104 wrote:Quand je veux me connecteur au site : auth.startssl.com la connection échoue..
ça le fait que pour moi ?
Je n'ai pas de soucis. Il faut faire très attention, le site utilise le certificat installé dans ton navigateur web pour t'authentifier. Vérifie bien si tu l'as.
Ah non je l'ai pas .. Il l'envoient pas mail ?
Ah non j'ai rien dit : "we could not validate the personal information you provided during the registration process"
J'aurai du lire avant d'essayer.. evidement j'ai mis des infos bidon
joyel2104 wrote:Ah non j'ai rien dit : "we could not validate the personal information you provided during the registration process"
J'aurai du lire avant d'essayer.. evidement j'ai mis des infos bidon
Ça m'est arrivé aussi la première fois. Des infos un peu grossières.
25 jours plus tard
Hello,

Merci pour ce tuto bien expliqué

Pour la fin de la première partie du tuto il ne faut plus aller boire un café car j'ai reçu directement mon certificat, le dernier message " You sucessfully finished etc...." n'apparait pas comme dans le tuto mais plutôt :
Thank you for choosing StartSSL™!
Thousands of subscribers already validated their identity and benefit today from the advanced capabilities of the Class 2 and EV level certificates. For features like wild cards (*.domain.com) and multiple domain names (UCC/SAN/SNI) please validate your identity and benefit even more from StartSSL™. Click on "Validations Wizard" -> "Identity Validation" -> "Class 2".
Et dans le toolbox on retrouve bien son certificat directement.

les WGET ne pas fonctionner non plus directement depuis le monde console sur le serveur (Accès refusée)
mais bon il fonctionnait bien directement sur le browser donc je les téléchargé et copié vers le bon répertoire.

le reste c'est bien déroulé

Un grand merci à vous et à ZAREV ( l'ami belge ) qui ma conseillé et également aidé dans ce tuto.

@++
5 jours plus tard
Bonsoir à tous,

Perso, j'ai fait la manip jusqu'au bout et c'est tout à la fin que j'ai un problème.

Lorsque je lance la commande
service nginx restart
J'ai la réponse suivante :
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
Une idée du problème ???

Merci d'avance
Comme indiqué dans le message :
systemctl status nginx.service
ou 
journalctl --full -u nginx --reverse
Alors voici le résultat :
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
   Active: failed (Result: exit-code) since jeu. 2015-07-30 10:49:32 CEST; 8s ag                                                                             o
  Process: 15539 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5                                                                              --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 14901 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (cod                                                                             e=exited, status=0/SUCCESS)
  Process: 4102 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process                                                                              on; (code=exited, status=1/FAILURE)
 Main PID: 14902 (code=exited, status=0/SUCCESS)

juil. 30 10:49:32 Serveur nginx[4102]: nginx: [emerg] unexpected "}" in /et...:4
juil. 30 10:49:32 Serveur nginx[4102]: nginx: configuration file /etc/nginx...ed
juil. 30 10:49:32 Serveur systemd[1]: nginx.service: control process exited...=1
juil. 30 10:49:32 Serveur systemd[1]: Failed to start A high performance we...r.
juil. 30 10:49:32 Serveur systemd[1]: Unit nginx.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Mon seul moyen à l'heure actuel de redémarrer nginx sans problème c'est de n'avoir que le fichier :
/etc/nginx/sites-enabled/rutorrent.conf
et sans aucune modification :
 server {
    listen 80 default_server;
    listen 443 default_server ssl;
    server_name _;

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

    ssl_certificate /etc/nginx/ssl/server.crt;
    ssl_certificate_key /etc/nginx/ssl/server.key;

    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 "seedbox";
    auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
    
    location = /favicon.ico {
        access_log off;
        log_not_found off;
    }
    
    ## début config 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 rutorrent ##

}
En résumer, impossible de forcer le https ou de mettre des sous domaines.

Quelqu'un pourrait m'aider ?
Bonjour,

Gaume Il faut faire attention à la syntaxe et notamment avec les accolades. A priori, cette erreur figure dans un autre fichier que celui fournit. Et ce malgré plusieurs vérifications.
De nouveau, cette commande à omis d'indiquer le fichier ainsi que la ligne... Alors autant consulter les fichiers logs.
Salut,

Apparemment, ils ne prennent plus en charge les noms domaine en .tk .ml .ga .cf .gq autrement dit les noms de domaine gratuits (freenom.com)

Dommage !
Gaume wrote:Alors voici le résultat :
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
   Active: failed (Result: exit-code) since jeu. 2015-07-30 10:49:32 CEST; 8s ag                                                                             o
  Process: 15539 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5                                                                              --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 14901 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (cod                                                                             e=exited, status=0/SUCCESS)
  Process: 4102 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process                                                                              on; (code=exited, status=1/FAILURE)
 Main PID: 14902 (code=exited, status=0/SUCCESS)

juil. 30 10:49:32 Serveur nginx[4102]: nginx: [emerg] unexpected "}" in /et...:4
juil. 30 10:49:32 Serveur nginx[4102]: nginx: configuration file /etc/nginx...ed
juil. 30 10:49:32 Serveur systemd[1]: nginx.service: control process exited...=1
juil. 30 10:49:32 Serveur systemd[1]: Failed to start A high performance we...r.
juil. 30 10:49:32 Serveur systemd[1]: Unit nginx.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Mon seul moyen à l'heure actuel de redémarrer nginx sans problème c'est de n'avoir que le fichier :
/etc/nginx/sites-enabled/rutorrent.conf
et sans aucune modification :
 server {
    listen 80 default_server;
    listen 443 default_server ssl;
    server_name _;

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

    ssl_certificate /etc/nginx/ssl/server.crt;
    ssl_certificate_key /etc/nginx/ssl/server.key;

    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 "seedbox";
    auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
    
    location = /favicon.ico {
        access_log off;
        log_not_found off;
    }
    
    ## début config 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 rutorrent ##

}
En résumer, impossible de forcer le https ou de mettre des sous domaines.

Quelqu'un pourrait m'aider ?
Hello,

juil. 30 10:49:32 Serveur nginx[4102]: nginx: [emerg] unexpected "}" in /et...:4
...
Hint: Some lines were ellipsized, use -l to show in full.

Tu as testé la commande ? pour savoir quel fichier n'est pas OK à la ligne 4 ?
23 jours plus tard
Bonjour
Très actif en ce moment sur mon dédié j'ai voulu reprendre le tuto pour installer un certificat StarSSL en fait j'ai tout recommencé !!
Arrivé au moment fatidique je redémarre nginx et....
Boum !! Message d'erreur dans rutorrent.conf :
 [emerg] unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/rutorrent.conf:161
Problème la ligne 161 est totalement vide car les codes s’arrêtent avant ???
Voici mon vhost :
server {
     listen 80;
     server_name mndd.com;
     return 301  https://mndd.com$request_uri;
}

server {
     listen 443 default_server ssl;
     server_name mndd.com;
     
      charset utf-8;
      index index.html index.php;
      client_max_body_size 10M;

      ssl on;
      ssl_certificate /etc/nginx/keys/mndd.com.crt-unified;
      ssl_certificate_key /etc/nginx/keys/mndd.com.key; 
      ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-G$
      ssl_prefer_server_ciphers on;
      ssl_dhparam /etc/nginx/ssl/dhparams.pem;

    
	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 "seedbox";
	auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";

	location = /favicon.ico {
		access_log off;
		log_not_found off;

	}


	## début config proxy ##

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

	## fin config proxy ##

	## début config rutorrent ##

	location ^~ / {
	    root /var/www/rutorrent;
	    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 rutorrent ##

	## début config munin ##

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

	location ^~ /graph/img {
	    root /var/www;
	    include /etc/nginx/conf.d/php.conf;
	    include /etc/nginx/conf.d/cache.conf;
	    error_log /dev/null crit;
	}

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

	## fin config munin ##

	## début config 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 seedbox-manager ##

        ## config utilisateurs  ##

        location /USER {
            include scgi_params;
            scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
            auth_basic "seedbox";
            auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_patchwork";
        }
location ^~ /syncnas {
         root /var/www;
         include /etc/nginx/conf.d/php.conf;
         include /etc/nginx/conf.d/cache.conf;
         index index.html index.php;
}

    
    ## debut config cakebox-light ##

    location /cakebox {
        rewrite ^/cakebox(/.*)$ $1 break;
        proxy_pass http://127.0.0.1:81;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_redirect    off;
    }
 
    location /cakebox/user/ {
        alias /home/user/torrents/;
        add_header Content-Disposition "attachment";
        satisfy any;
        allow all;
    }

    location /cakebox/<username2>/ {
        alias /home/<user2>/torrents/;
        add_header Content-Disposition "attachment";
        satisfy any;
        allow all;
    }

## début config linux-dash ##
        location ^~ /linux-dash {
            root /var/www;
            include /etc/nginx/conf.d/php.conf;
            include /etc/nginx/conf.d/cache.conf;
        }

        ## fin config linux-dash ##

}
Là ça me dépasse un peu d'autant plus que le tout premier message :
[emerg] unexpected "a" in /etc/nginx/sites-enabled/rutorrent.conf:45
tombait sur une ligne commentée et du coup j’avais effacé le bloc entier (config de _h5ai)
Pour finalement retombé sur le message avec la ligne 161 fantôme !!
Si quelqu'un a une idée, une solution... Merci !!