I hope everyone is doing well. I have created a Rocky Linux container that includes PHP and Apache. I run the image with :8080
port open. Whenever I try to reach the web server from a web browser by going into localhost:8080
I get 503 Service Unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
503 Service Unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
error. I couldn't figure what to do next. How can I solve this issue? Thanks!
This is my Dockerfile:
RUN dnf update -y
RUN dnf install httpd -y
RUN dnf install php -y
RUN dnf install procps -y
RUN dnf install net-tools -y
RUN dnf install findutils -y
RUN dnf install vim -y
RUN dnf install git -y
RUN mkdir /run/php-fpm
ADD index.php /var/www/html/
CMD apachectl -D FOREGROUND```
"On RHEL 8/Rocky Linux 8, [mod_php] has been Deprecated and PHP-FPM (FPM: FastCGI Process Manager) is configured by default."
Check to see if the php-fpm service is running. If its not by default (which it most likely is not) you can modify the Dockerfile to also start php-fpm
In your Dockerfile
try something like:
CMD php-fpm -D; /usr/sbin/httpd -D FOREGROUND
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.