Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!