diff --git a/Dockerfile b/Dockerfile index 77a2b1ec..97ec240b 100755 --- a/Dockerfile +++ b/Dockerfile @@ -31,11 +31,6 @@ RUN apk add --no-cache \ # config httpd.conf RUN sed -i '/LoadModule rewrite_module/s/^#//g' /etc/apache2/httpd.conf -USER apache -RUN touch /var/log/apache2/access.log -RUN touch /var/log/apache2/error.log - -USER root # Install PHP and extenions RUN apk add --no-cache \ php81-common \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index af1360bb..459f0983 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,9 +9,11 @@ if [ ! -d "$PWD/vendor" ]; then fi source "$PWD/.env" +# Do something after get environment -# Do something get environment - +echo '' > ./var/log/apache2_error.log +echo '' > ./var/log/apache2_access.log +chown apache:apache -R ./var/log/apache2_* chown -R apache:apache /var/www/html chmod -R 775 /var/www/html httpd -D FOREGROUND diff --git a/var/log/.gitignore b/var/log/.gitignore index b0cf0c3a..f935021a 100755 --- a/var/log/.gitignore +++ b/var/log/.gitignore @@ -1,2 +1 @@ -*.log !.gitignore diff --git a/var/log/apache2_access.log b/var/log/apache2_access.log new file mode 100755 index 00000000..8b137891 --- /dev/null +++ b/var/log/apache2_access.log @@ -0,0 +1 @@ + diff --git a/var/log/apache2_error.log b/var/log/apache2_error.log new file mode 100755 index 00000000..05ecb77b --- /dev/null +++ b/var/log/apache2_error.log @@ -0,0 +1,4 @@ + +AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.16.3. Set the 'ServerName' directive globally to suppress this message +[Mon Dec 04 02:58:06.683632 2023] [mpm_prefork:notice] [pid 18] AH00163: Apache/2.4.58 (Unix) PHP/8.1.26 OpenSSL/3.1.4 configured -- resuming normal operations +[Mon Dec 04 02:58:06.683682 2023] [core:notice] [pid 18] AH00094: Command line: 'httpd -D FOREGROUND'