# Domain.tld/public/index.php redirecting to domain.tld/public/installer after running shopware-installer.phar.php

**URL:** https://forum.shopware.com/t/domain-tld-public-index-php-redirecting-to-domain-tld-public-installer-after-running-shopware-installer-phar-php/103126
**Category:** Installation / Einstieg
**Tags:** general
**Created:** [26. Februar 2024 um 15:13 UTC](https://forum.shopware.com/t/domain-tld-public-index-php-redirecting-to-domain-tld-public-installer-after-running-shopware-installer-phar-php/103126 "2024-02-26T15:13:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fastsite](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@fastsite](https://forum.shopware.com/u/fastsite)
#### Post date: [26. Februar 2024 um 15:13 UTC](https://forum.shopware.com/t/domain-tld-public-index-php-redirecting-to-domain-tld-public-installer-after-running-shopware-installer-phar-php/103126/1 "2024-02-26T15:13:45Z")

</div>

Hello Shopware community! 👋

I’ve set up a Caddy, PHP 8.3-FPM Alpine, MariaDB stack in Docker running on a virtual server (AlmaLinux 9 with root access)

I have the following structure

> /lcmp  
> /lcmp/caddy\_docker  
> /lcmp/php\_docker  
> /www

in /lcmp there is a `custom-php.ini` see here

```auto
memory_limit = 640M
max_execution_time = 300
max_input_time = 300
; Additional PHP settings for Shopware 6
upload_max_filesize = 64M
post_max_size = 64M
max_input_vars = 10000

```

The `custom-php.ini` is correctly loaded into the PHP docker container

```auto
docker exec lcmp-2-php-1 php -r "echo ini_get('memory_limit').PHP_EOL;"
640M

```

and there is` docker-compose.yaml` for setting up the docker containers

```auto
version: "3.8"
services:

  # PHP Service
  php:
    build: './php_docker/'
    volumes:
      - ./www/:/var/www/html/
      - ./custom-php.ini:/usr/local/etc/php/conf.d/custom-php.ini

  # Caddy Service
  caddy:
    build: './caddy_docker/'
    depends_on:
      - php
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - ./www/:/var/www/html/
      - ./caddy_docker/Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
      - caddy_config:/config

  # MariaDB Service
  mariadb:
    image: mariadb:10.11
    environment:
      MYSQL_ROOT_PASSWORD: <redacted>
    volumes:
      - mysqldata:/var/lib/mysql

  # phpMyAdmin Service
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    ports:
      - 8080:80
    environment:
      PMA_HOST: mariadb
    depends_on:
      - mariadb

# Volumes
volumes:
  mysqldata:
  caddy_data:
  caddy_config:

```

In **/lcmp/caddy\_docker** there is a `Dockerfile` see here

```auto
# Use the official Caddy Docker image
FROM caddy:latest

# Update package index and upgrade installed packages
RUN apk update && apk upgrade

# Copy Caddyfile to configure Caddy server
COPY Caddyfile /etc/caddy/Caddyfile

```

and a `Caddyfile` see here

```auto
mydomain.tld {
  header {
    X-Frame-Options DENY
    Referrer-Policy no-referrer-when-downgrade
    X-Content-Type-Options nosniff
    Strict-Transport-Security max-age=31536000;
    -server
    -Link
    -X-Powered-By
  }

  @svg {
    file
    path *.svg
  }

  header @svg Content-Security-Policy "script-src 'none'"

  @default {
    not path /theme/* /media/* /thumbnail/* /bundles/* /css/* /fonts/* /js/* /recovery/* /sitemap/*
  }

  root * /var/www/html

  php_fastcgi php:9000
  encode zstd gzip
  file_server
}

```

In **/lcmp/php\_docker** there is the Dockerfile see here

```auto
FROM php:8.3-fpm-alpine

# Downloading install-php-extensions script and making it executable
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/install-php->RUN chmod +x /usr/local/bin/install-php-extensions

# Installing PHP extensions using install-php-extensions script
RUN install-php-extensions \
    mysqli \
    pdo \
    pdo_mysql \
    gd \
    zip \
    intl \
    xml \
    curl \
    dom \
    fileinfo \
    iconv \
    json \
    libxml \
    mbstring \
    openssl \
    pcre \
    phar \
    simplexml \
    zlib

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

# Cleaning APK cache
RUN rm -rf /var/cache/apk/*

```

Here is the output of `docker ps` after running `docker build --no-cache` and `docker compse up -d` in **/lcmp**

> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES  
> 982b7afe5947 phpmyadmin/phpmyadmin:latest „/docker-entrypoint.…“ 47 minutes ago Up 47 minutes 0.0.0.0:8080-\>80/tcp, :::8080-\>80/tcp lcmp-2-phpmyadmin-1  
> aea6e2ed5f93 lcmp-2-caddy „caddy run --config …“ 47 minutes ago Up 47 minutes 0.0.0.0:80-\>80/tcp, :::80-\>80/tcp, 0.0.0.0:443-\>443/tcp, :::443-\>443/tcp, 0.0.0.0:443-\>443/udp, :::443-\>443/udp, 2019/tcp lcmp-2-caddy-1  
> 4f2b7e22d139 mariadb:10.11 „docker-entrypoint.s…“ 47 minutes ago Up 47 minutes 3306/tcp lcmp-2-mariadb-1  
> 0beb8e32af1c lcmp-2-php „docker-php-entrypoi…“ 47 minutes ago Up 47 minutes 9000/tcp lcmp-2-php-1

Uploading a index.html file to the folder /www/public and browsing to mydomain.tld/public/index.html works but when I browse to mydomain.tld/public/index.php or mydomain.tld/public/maintenance.php it automatically redirects to mydomain.tld/public/installer or says „File not found“

I installed Shopware 6 by uploading the `shopware-installer.phar.php` to the `/www` folder

Here [similar error shopware community forum](https://forum.shopware.com/t/problem-installing-shopware-6-4-17/97014)

it says mod\_rewrite might not be active but I do not know if that is relevant since I’m running a Caddy server instead of Apache.

I’m really new to all this so I’m very grateful for any tips or hints you can give me regarding this issue! Sorry for the long question!

Best regards!
