You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm playing around with Wordpress and Kubernetes (RedHat Openshift 4.5) and everytime I try to boot up my Wordpress with Apache it give me following issue.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.130.2.22. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
And this is because Openshift doesn't allow root access and Apache need root access for any port below 1024:ish.
So I suggest that you also insert a variable for port change on the apache side.
The text was updated successfully, but these errors were encountered:
wglambert
added
question
Usability question, not directly related to an error with the image
Request
Request for image modification or feature
labels
Sep 4, 2020
Thanks @wglambert
I found two solutions for the same problem. So I'll will just add them here if anyone else has the same issue could solved it.
Either you add following link to your yaml file, and I think this is the best way.
spec:
containers:
- image: wordpress:5.5.1-php7.2-apache
name: wordpress
securityContext: # This is what wglambert referring to
sysctls: # Will add a sysctl in variable to your container
- name: net.ipv4.ip_unprivileged_port_start # You will modify the this parameter
value: "0"
The other way to solve it is to give access for root to run in your container. Maybe a security issue but it works.
oc get pod <POD NAME> -o yaml | grep -i serviceAccountName # Verify what service account your container are running
serviceAccountName: default # Output should be default
oc adm policy add-scc-to-user anyuid -z default # Change Policy to allow root access in your pod
oc delete pod <POD NAME> # Delete your old pod to automaticelly create a new pod with root access
I'm playing around with Wordpress and Kubernetes (RedHat Openshift 4.5) and everytime I try to boot up my Wordpress with Apache it give me following issue.
And this is because Openshift doesn't allow root access and Apache need root access for any port below 1024:ish.
So I suggest that you also insert a variable for port change on the apache side.
The text was updated successfully, but these errors were encountered: