• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Nginx overrides Apache directives

ramherfer

New Pleskian
Server operating system version
CentOS Linux 7.9.2009
Plesk version and microupdate number
Plesk Obsidian Versión 18.0.48
Hello good day.
I'm having problems with apache and nginix or at least I think that the cause of the apache directives being invalidated and not working is thanks to nginx.
I have two protected directories, in which to access the client has to present his client certificate (SSLVerifyClient optional_no_ca). I have this configured in Apache through <Location path> but when browsing those directories it does not request Apache, it is not requesting the client certificate.
However, if I use the ssl_verify_client directive at the nginx level, it does request the certificate in an inconsistent way and at the server level, which is of no use to me.
I have some local test with xampp and it works perfect. The main difference I think is that Nginx is not present.
Is there a way to disable nginx to check if it is the culprit of the problem?
Thanks
ssl.conf Apache
<Location /validador>
DirectoryIndex solicitud.php
AllowOverride all
#Require all granted
SSLOptions +StdEnvVars +ExportCertData +OptRenegotiate
SSLVerifyClient optional_no_ca
SSLVerifyDepth 3
</Location>
#
<Location "/inscripciones/vistas/validador">
DirectoryIndex solicitud.php
AllowOverride all
# #Require all granted
SSLOptions +StdEnvVars +ExportCertData +OptRenegotiate
SSLVerifyClient optional_no_ca
SSLVerifyDepth 3
</Location>

--------------------------------------------------------------------------------------
Hola buenos días.
Estoy teniendo problemas con apache y nginix o por lo menos eso creo que el causante de que las directivas de apache queden invalidadas y no funcionen es gracias a nginx.
Tengo dos directorios protegidos, en los cuales para acceder el cliente tiene que presentar su certificado de cliente (SSLVerifyClient optional_no_ca). Esto lo tengo configurado en Apache mediante <Location path> pero al navegar por esos directorios no solicita Apache no me está solicitando el certificado de cliente.
Sin en cambio, si utilizo la directiva ssl_verify_client a nivel de nginx si que solicita el certificado de una forma inconsistente y a nivel de servidor, lo cual no me sirve.
Tengo alguna prueba en local con xampp y funciona perfecto. La principal diferencia creo que está en que Nginx no está presente.
¿Habría alguna forma de desactivar nginx para comprobar si es el culpable del problema?
Gracias
 
As the endpoint for a connection to an nginx-enabled server is Nginx, all SSL related settings that are visible to the Internet must be made in Nginx, not in Apache. If this is not an option for you, you can disable Nginx altogether and continue using your server with Apache only. For example you can run
# /usr/local/psa/admin/sbin/nginxmng -d to disable Nginx.
 
Thanks for the answer Peter. I don't know if executing that command line will be the same as directly deactivating the service from Plesk. In the case of being the same, I already tried to disable the Nginx service from Plesk and the web page stopped working.
If I execute that command, could you tell me how to revert it in case the page stops working?
Thanks again.
 
It is not the same. The difference is that you can start and stop Nginx when it is installed, but the system still remains configured for use of the Nginx/Apache combo. When you deinstall it, it is completely removed from web server configuration files and Apache will listen do ports 80 and 443 directly. Here the commands again for you:

Deactivate and remove Nginx from web server configuration construct:
# /usr/local/psa/admin/sbin/nginxmng -d

Activate Nginx and reconfigure web servers to use Nginx as front-end and Apache as backend:
# /usr/local/psa/admin/sbin/nginxmng -e

See what is currently set:
# /usr/local/psa/admin/sbin/nginxmng -s
 
Well, tried the command line and the server stops working. Both the web page and Plesk stop working.
I have restarted the server and the web page and Plesk are not responding either.
The error that dumps is in the attached image.
 

Attachments

  • error_plesk.jpg
    error_plesk.jpg
    227.1 KB · Views: 2
Removing Nginx from the configuration cannot be the root cause unless there are custom web server configuration templates. It's not doing much but to reconfigure the web server configuration files. However, in such a case restoring the Nginx configuration should have fixed the issue. I suspect a different issue there. This needs to be examined by someone from support staff. Please open a ticket to get this solved hands-on on your server by support:
 
Back
Top