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

249
Vistas
Port conflict by Apache httpd and by docker-compose on AWS EC2

The issue started with the connection between GraghQL client and Apollo server. I setup the client on NextJS and deployed the backend on AWS EC2 with docker-compose. I put in "http://xxx" as the uri for client and received error:

"Mixed Content: The page was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint nextjs"

So I tried to get SSL/TLS on the backend and followed AWS' instructions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html

When trying to start Apache, I received error:

"Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details."

I then stopped the container by running "docker-compose down" and I was able to start Apache. After the site supports https, I ran "docker-compose up --build" and it says the ports are already used. I tried the following one by one but the issue still exit:

  1. Edited the httpd.conf and changed port from 80 to 443;
  2. Revised ports in the docker-compose.yml from 80 to 443

If I stopped Apache then the creation process worked.

May I know:

  1. How to resolve the ports conflict? (/etc is in parallel to the repository's root folder. I am not sure whether this caused the issue)
  2. What is the right way to make https work in this case?
  3. Is it how GraghQL client connect to backend server?

docker-compose.yml

version: '3.6'
services:

  graphql-server:
    container_name: backend
    build: ./
    command:
      bash -c "export TWILIO_EMAIL_KEY="${TWILIO_EMAIL_KEY}" && npm start"
    working_dir: /src/graphqlserver
    ports:
      - "80:4000"
    environment:
      - TWILIO_EMAIL_KEY="${TWILIO_EMAIL_KEY}"

over 4 years ago · Santiago Trujillo
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