diff --git a/config/supervisord.conf b/config/supervisord.conf index 7fae50c..385f9ba 100644 --- a/config/supervisord.conf +++ b/config/supervisord.conf @@ -1,5 +1,6 @@ [supervisord] nodaemon=true +user=root [program:sshd] command=/usr/sbin/sshd -D @@ -11,4 +12,4 @@ priority=20 command=/usr/sbin/httpd -D FOREGROUND -f /etc/apache2/httpd.conf autostart=true autorestart=true -priority=10 +priority=10 \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 06798d6..00d2b53 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -36,7 +36,7 @@ RUN rm -f /var/www/localhost/htdocs/index.html # enable php module in apache -RUN echo "LoadModule php_module /usr/lib/php82/libphp.so" > /etc/apache2/conf.d/php.conf +RUN echo "LoadModule php_module /usr/lib/apache2/mod_php82.so" > /etc/apache2/conf.d/php.conf # copy the app @@ -75,6 +75,8 @@ COPY ./config/codes.txt /root/ RUN chown root:root /root/codes.txt +RUN mkdir -p /run/httpd && chown apache:apache /run/httpd + # 22 port -> ssh, 8080 port -> webserver EXPOSE 22 @@ -85,5 +87,5 @@ EXPOSE 8080 COPY config/supervisord.conf /etc/supervisor.d/httpd.ini # start supervisord -CMD ["/usr/bin/supervisord", "-n"] +CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor.d/httpd.ini"]