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

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 (RHEL)
    • 7
    • 8
  • Apache httpd
    • 2.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content