How to run Apache httpd server from a non-root user in RHEL 7?

Solution Verified - Updated -

Issue

  • How to run Apache httpd server from a non-root user in RHEL 7?
  • How to run httpd parent process from non-root user?
  • Facing below errors in logs :

    $ /usr/sbin/httpd -k start
    (13)Permission denied: AH00058: Error retrieving pid file /run/httpd/httpd.pid
    AH00059: Remove it before continuing if it is corrupted.
    

Environment

  • Red Hat Enterprise Linux
    • 7
  • Apache httpd
    • 2.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In