services:
php:
image: php:8.1.29-fpm-alpine
volumes:
- ./admin:/usr/src/admin
extra_hosts:
- "docker-admin.localhost:127.0.0.1"
expose:
- "9000"
entrypoint: ["php-fpm"]
apache-server:
build: .
ports:
- 8080:80
volumes:
- ./admin:/usr/local/apache2/htdocs/admin
depends_on:
- php
FROM httpd:2.4.52-alpine3.15
RUN mkdir -p /usr/local/apache2/conf/vhosts
COPY ./conf/* /usr/local/apache2/conf/vhosts
COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf
<VirtualHost *:80>
ServerName docker-admin.localhost
DocumentRoot /usr/local/apache2/htdocs/apps/admin/public_html
<Directory /usr/local/apache2/htdocs/apps/admin/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:fcgi://php:9000"
</FilesMatch>
ErrorLog /usr/local/apache2/error.log
LogLevel warn
CustomLog /usr/local/apache2/access.log combined
</VirtualHost>
[Sun Oct 06 10:02:48.889047 2024] [authz_core:error] [pid 10:tid 131326541519672] [client 192.168.16.1:49194] AH01630: client denied by server configuration: /usr/local/apache2/htdocs/apps/admin/public_html/.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
-rw-r--r-- 1 504 dialout 45 Jun 11 2007 index.html
drwxrwxr-x 12 www-data www-data 4096 Oct 6 09:57 apps