Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You don't have permission to access this resource. - docker-compose #296

Open
debek opened this issue Sep 14, 2024 · 1 comment
Open

You don't have permission to access this resource. - docker-compose #296

debek opened this issue Sep 14, 2024 · 1 comment

Comments

@debek
Copy link

debek commented Sep 14, 2024

Hi,

I believe the embedded Apache in the image might have a misconfiguration, as it seems to cause this issue by design.

Container log:

mautic | [Sat Sep 14 18:36:14.211741 2024] [autoindex:error] [pid 27] [client 192.168.65.1:47147] AH01276: Cannot serve directory /var/www/html/docroot/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
mautic | 192.168.65.1 - - [14/Sep/2024:18:36:14 +0000] "GET / HTTP/1.1" 403 492 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"

Browser:

Forbidden
You don't have permission to access this resource.

Curl:

ccurl http://localhost:8083/

  • Host localhost:8083 was resolved.
  • IPv6: ::1
  • IPv4: 127.0.0.1
  • Trying [::1]:8083...
  • Connected to localhost (::1) port 8083

GET / HTTP/1.1
Host: localhost:8083
User-Agent: ccurl
Accept: /
Cache-Control: no-cache

  • Request completely sent off
    < HTTP/1.1 403 Forbidden
    < Date: Sat, 14 Sep 2024 18:42:00 GMT
    < Server: Apache/2.4.59 (Debian)
    < Content-Length: 276
    < Content-Type: text/html; charset=iso-8859-1
    <
    { [276 bytes data]
  • Connection #0 to host localhost left intact

docker-compose.yaml

networks:
  apps-network:
    external: true
    name: apps-network
  internal-network:
    driver: bridge
volumes:
  mautic_data:
  mauticdb_data:

services:
  mautic:
    container_name: mautic
    image: mautic/mautic:5.1-apache
    restart: always
    # Comment out the ports section if you are using a reverse proxy
    ports:
      - "8083:80"
    environment:
      MAUTIC_DB_HOST: mauticdb
      MAUTIC_DB_USER: XXX
      MAUTIC_DB_PASSWORD: XXX
      MAUTIC_DB_NAME: XXX
      MAUTIC_RUN_CRON_JOBS: 'true'
    volumes:
      - ./mautic_data:/var/www/html
    networks:
        - internal-network
        - apps-network

  mauticdb:
    container_name: mauticdb
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: XXX
      MYSQL_DATABASE: XXX
      MYSQL_USER: XXX
      MYSQL_PASSWORD: XXX
    volumes:
      - ./db_data:/var/lib/mysql
    networks:
        - internal-network
@YShane
Copy link

YShane commented Nov 1, 2024

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants