Após inumeras tentativas, não consegui subir o sistema após tê-lo colocado na pasta public, meu ambiente é docker, até consegui executar o comando php -S <ip do container do apache>:<porta>
-t public/.
Solicito uma orientação para configurar melhor o meu ambiente.
Obrigado.
docker-compose.yml
version: "3.1" services: www_edson: container_name: www_edson build: . ports: - 8085:80 volumes: #- ./www/:/var/www/html - ./www/Alura/MVC/aluraplay:/var/www/html links: - db_edson networks: - edsonnet [...]
Dockerfile
FROM php:8.2-apache LABEL maintainer="edsongsilva" RUN apt update RUN apt install -y \ g++ \ libicu-dev \ libpq-dev \ libmcrypt-dev \ libmcrypt4 \ mcrypt \ git \ zip \ nano \ unzip \ libzip-dev \ zlib1g-dev \ curl \ libpng-dev \ libxml2-dev \ libonig-dev RUN rm -r /var/lib/apt/lists/* RUN docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd RUN docker-php-ext-configure intl RUN docker-php-ext-install intl RUN docker-php-ext-install mbstring RUN docker-php-ext-install pcntl RUN docker-php-ext-install pdo_mysql RUN docker-php-ext-install pdo_pgsql RUN docker-php-ext-install pgsql RUN docker-php-ext-install zip RUN docker-php-ext-install opcache RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer ENV APP_HOME /var/www/html RUN usermod -u 1000 www-data && groupmod -g 1000 www-data #RUN sed -i -e "s/html/html\/webroot/g" /etc/apache2/sites-enabled/000-default.conf RUN a2enmod rewrite COPY . $APP_HOME RUN chown -R www-data:www-data $APP_HOME
.htacess RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?urlrota=$1 [NC,L]