Author Topic: Server does not take SSL certificates, does not load the correct site and stops  (Read 6997 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Server does not take SSL certificates, does not load the correct site and stops Nginx

Hi all.
I use the forum because I do not know what to do anymore.
My server with CWP presents the error that when I create the SSL certificates, which I believe well, but when I enter the https url, it does not take it and the sample is the server's certificate and the browser. Shows a certificate error. When we give a click to add exception, load is the page index.html default of the CWP instead of the correct site that if it is shown with http.
The SSL error is present for both the main domain and subdomains
I thought that perhaps with a restart of the server it would be accommodated, but that it was worse, to restart in the Dashboard. More than the Nginx service was stopped, the registry is something like "I can not boot because another service is running on port 443" Try to Boot with the Start button and restart, but it did not work.
As the last change I made were the SSL certificates, the removal, the service and the restart.
The server is configured with CWPpro version: 0.9.8.763
Nginx and Apache
HTTP: Nginx (80) -> Apache (8181)
HTTPS: Nginx (443) -> Apache (8181)
PHP-FPM 7.3
I read in the forum that other people also like it, but it does not work for me.
In case you like the process that I followed, it was.
I bought a VPN with Centos 7, I think I already had Apache and did not delete it (maybe my priming error?)
The provider tells me that the name of the server is server.mydomain.com
It was a hosting server and a DNS record type A, for server.mydomain.com pointing to the VPS
The VPS was always handled with CWP by https://server.mydomain.com and not by the IP (maybe my second mistake?)
Install the CWP with the recommendations that appear on the official page, Nginx and Apache servers t PHP-FPM 7.3
To avoid the error of the self-signed certificate by the server, we follow the recommendations of the CWP WIKI and the new Lesencrypt certificate through the option to change the name of the menu, leaving the same name server.mydomain.com
That SSL is the only one that works well, (https://server.mydomain.com)
Then you create the first user account and place it as the main domain mydomain.com
Subsequently enter CW Panel of that client user (not the CWP administrator) and several subdomains for the domain without using the SSL option and the beginning of the SSL load, but if we plan to use it later, the particularity here is that all they use the same folder and the php is responsible for the content to be shown according to the subdomain.
Example:
mydomain.com> / home / user / public_html
sub1.mydomain.com> / home / user / public_html
sub2.mydomain.com> / home / user / public_html
sub3.mydomain.com> / home / user / public_html
sub4.mydomain.com> / home / user / public_html
sub5.mydomain.com> / home / user / public_html
So far, the main pages of the domain as the subdomains work all right, with http.
But when you try by pure chance the url with https, the problem that shows a certificate error (server.dominio.com takeover when you even configure those sites with SSL) and load an index.html that is not the site was presented.
Reading in the forum, I think we understand that they behave like a shared server takes the "main" SSL, so I decided to create all their SSL certificates to both mydomain.com and subx.mydomain.com to show the correct site , use the auto SSL of the CWPANEL client side
There the error that allowed him at the beginning was presented, if the certificates are created and they are not in the site.
Sorry for the length of my writing, but I can not explain it in the shortest way.
Please help me, what should I do to make SSL work for my server?
Thank you

 ********************************************************

Servidor no toma los certificados SSL, no carga el sitio correcto y se detiene Nginx
Hola a todos.
Recurro al foro porque ya no sé qué hacer.
Mi servidor con CWP presenta el error que cuando creo los certificados SSL, dice que los creo bien, pero cuando entro a la url https, no los toma y muestra es el certificado del servidor (que es con Lesencrypt) y por lo tanto el navegador muestra un error de certificados. Cuando le doy clic a añadir excepción, carga es la página index.html default del CWP  en vez del sitio correcto que si se muestra con http.
El error SSL se presenta tanto para el dominio principal como subdominios
Pensé que quizás con un reset del servidor se acomodaría, pero fue peor, al reiniciar en el Dashboard mostraba que el servicio Nginx estaba parado, el log decía algo así como “no puedo arrancar porque otro servicio está ejecutándose en el puerto 443” Trate de hacer un arranque con el botón Start y Restart, pero no funciono.
Como el último cambio que hice fueron los certificados SSL, los elimine, y allí si arranco bien el servidor al reiniciar.
El servidor lo configure con CWPpro versión: 0.9.8.763
 Nginx & Apache
HTTP: Nginx (80) --> Apache (8181)
HTTPS: Nginx (443) --> Apache (8181)
PHP-FPM 7.3
Leí en el foro que a otras personas tuvieron errores similares al crear la cuenta del usuario principal, seguí las recomendaciones que hablan allí, pero no me funciona a mí.
Por si ayuda el proceso que seguí fue.
Compre un VPN con Centos 7, creo que ya tenía apache y no lo elimine (¿quizás mi primer error?)
El proveedor me dice que el servername es server.mydomain.com
Fue a mi hosting viejo y cree un Registro DNS tipo A, para server.mydomain.com apuntando al VPS
Siempre he manejado el VPS con CWP por https://server.mydomain.com y no por la IP (¿quizás mi segundo  error?)
Instale el CWP con las recomendaciones que salen en la página oficial, servidores Nginx & Apache t PHP-FPM 7.3
Para evitar el error del certificado autofirmado por el servidor, seguí las recomendaciones del WIKI de CWP y le cree un certificado de Lesencrypt a través de la opción changue hostname del menú, dejando el mismo nombre server.mydomain.com
Ese SSL es el único que funciona bien, (https://server.mydomain.com)
Luego cree la primera cuenta de usuario y le coloque como dominio principal mydomain.com
Posteriormente entre por en CWPanel de ese usuario cliente (no por el CWP admin) y cree varios subdominios para ese dominio sin usar la opción crear SSL ya que para empezar no voy a usar SSL, pero si lo pensaba usar más adelante, la particularidad acá es que todos usan la misma carpeta y el php es el que se encarga de que contenido mostrar según el subdominio.
Ejemplo:
mydomain.com > /home/user/public_html
sub1.mydomain.com > /home/user/public_html
sub2.mydomain.com > /home/user/public_html
sub3.mydomain.com > /home/user/public_html
sub4.mydomain.com > /home/user/public_html
sub5.mydomain.com > /home/user/public_html
Hasta acá todo bien, las paginas tanto del dominio principal como de los subdominios funcionan todo ok, con http.
Pero al probar por pura casualidad la url con https, se presentó el problema que muestra un error de certificado (toma el del server.mydomain.com cuando ni siquiera configure esos sitios con SSL) y carga un index.html que no es el sitio.
Leyendo en el foro, creo que entendí que al comportarse como un servidor compartido toma el SSL “principal”, por lo tanto decidí crearle a todos sus certificados SSL tanto a mydomain.com como a los subx.mydomain.com para que muestren el sitio correcto, use el auto SSL del CWPANEL lado cliente
Allí se presentó el error que le hable al comienzo, se crean los certificados (los busque en sus ubicaciones y ciertamente están allí los 3 archivos) pero no funcionan los sitios con sus SSL correctos y al reiniciar el servidor o nginx, nginx se detiene.
Disculpen lo largo del mi escrito, pero no puedo explicarme de forma más corta.
Por favor ayúdenme, ¿Qué debo hacer para que en mi servidor funcione bien los SSL?
Gracias!


Offline
*****
Hello
try to rebuild webserver settings

Offline
*
Hello Sandeep, thanks for replying.
What exactly do you mean with rebuild? Delete the sites and recreate them?
The problem is that the server is already in production, and users have already uploaded files (photos, documents) and records in the database

Offline
*
Hello
try to rebuild webserver settings

Hello Sandeep, thanks for replying.
What exactly do you mean with rebuild? Delete the sites and recreate them?
The problem is that the server is already in production, and users have already uploaded files (photos, documents) and records in the database

Offline
***
I cannot add ssl to any domain using auto ssl (FREE).  the blue INSTALL button is grayed out no matter what domain I try.  Frustrating.