Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
Openshift Apache/Nginx 405 not allowed

We are using OpenShift 3.4. Using a s2i PHP image for pod. When doing a curl from pod to an external resource it's returning 405 Not Allowed nginx/1.16.1. The code is running fine on the local setup. As I understood from web, it's due to the fact our own server is not allowing POST request and we need to configure it to allow the same.

$ch = curl_init($ldapAuthURL);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$response = curl_exec($ch);

I am unable to resolve this, since I don't have any experience with OpenShift I tried looking for httpd file but it's to be found no where. The support team is not able to help either, they are saying they support image pushing and pulling only and it's our application code that is faulty.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

To my dismay support team was right, It was an application issue. My team member has configured the URL of the frontend which was running an angular app on nginx. Hence the cryptic error 405 nginx since the frontend won't support post requests on that URL.

That's why there were no Nginx config files in the PHP pod since it was using Apache to serve the files.

Steps to resolve:

  1. I created a standalone curl service in PHP using the public URL.
  2. It worked. Then I was sure there's some issue with my application code
  3. I tried standalone curl with the URL PHP was hitting, it returned the same 405 error.
  4. It gave a clear result there's some issue with the URL
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda