cURL error 7: Failed to connect to localhost port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) code example
Example 1: cURL error 7: Failed to connect to localhostport 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
apache2:
...
depends_on:
- php-fpm
networks:
frontend:
aliases:
- auth.skwirk.me
- lcms.skwirk.me
- lmsapi.skwirk.me
- sub.skwirk.me
backend:
aliases:
- auth.skwirk.me
- lcms.skwirk.me
- lmsapi.skwirk.me
- sub.skwirk.me
Example 2: cURL error 7: Failed to connect to localhost port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost/oauth/token
#Nginx Service
nginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- ../:/var/www
- ./nginx/sites/:/etc/nginx/conf.d/
- ./nginx/log/:/var/log/nginx/
depends_on:
- php-fpm
- mysql
networks:
app-network:
aliases:
- api.local