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

601
Vistas
Error: cURL error 28: Resolving timed out after 10000 milliseconds (http_request_failed) with nginx reverse proxy in docker

I am trying to set up a local Wordpress environment using Docker Compose with Nginx reverse proxy. WordPress. works but in Site Health I get:

Error: cURL error 28: Resolving timed out after 10000 milliseconds (http_request_failed)

This my docker-compose file

version: '3.1'

services:

  web:
    image: nginx
    ports:
      - "80:80"
    volumes:
      - ./site.conf:/etc/nginx/conf.d/site.conf
    depends_on:
      - wordpress
      - db

  wordpress:
    image: wordpress
    expose:
      - 80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: local_user
      WORDPRESS_DB_PASSWORD: secret
      WORDPRESS_DB_NAME: local
    volumes:
      - ./wordpress:/var/www/html

  db:
    image: mysql:5.7
    environment:
      MYSQL_DATABASE: local
      MYSQL_USER: local_user
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: root_secret
    ports:
      - 3306:3306
    volumes:
      - ./mysql:/var/lib/mysql

this is my Nginx config file:

upstream backend{
    server wordpress:80;
}

server {
    listen 80;
    listen [::]:80;

    index index.php index.html;
    server_name bedrock.local; 
    # error_log  /var/log/nginx/error.log;
    # access_log /var/log/nginx/access.log;
    # root /code/web;

    location / {
        proxy_pass http://backend/;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }

}

bedrock.local domain resolves locally with 127.0.0.1 in /etc/hosts I'm not using HTTPS (just HTTP) to simplify the test.

Thanks!

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

0

I had the same issue, Wordpress container cannot reach the website on the public IP address due to the Docker networking.

The best solution to this is to add the fqdn aliases to the Nginx container in the docker-compose.yml file to allow Wordpress to reach Nginx internally.

This config will solve the issue:

web:
  image: nginx
  ports:
    - "80:80"
  volumes:
    - ./site.conf:/etc/nginx/conf.d/site.conf
  depends_on:
    - wordpress
    - db
  networks:
    default:
      aliases:
        - yourwebsite.com
        - www.yourwebsite.com
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