title: How to run apache as non-root, using non-standard ports?
body: <p>I need to get apache running as a non-root user, listening to port 8443, in order to have a new website available (on localhost:8443) for internal security scanning, on a CentOS 7.3 system. I understand only the basics of apache (on Ubuntu), and I am NOT a web administrator, so am unfamiliar with the many options / config settings necessary to get this to work.</p>
  
  <p>I have a directory (/webcontent) with my website content (which requires php), and can host there the various conf files necessary. But I am stumbling through getting httpd.conf setup properly for apache to run as a local user, launched with:</p>
  
  <pre><code>httpd -f /webcontent/conf/httpd.conf
  </code></pre>
  
  <p>And have set the logs to write to /webcontent/logs (via ErrorLog parameter), but it then complains about not having write access to /run/httpd, and so won't actually start:</p>
  
  <blockquote>
    <p>[Thu Feb 23 11:59:51.289587 2017] [auth_digest:error] [pid 25464]
    (13)Permission denied: AH01762: Failed to create shared memory segment
    on file /run/httpd/authdigest_shm.25464</p>
  </blockquote>
  
  <p>I imagine this is only the first of many problems I might have to get this running, so if anyone can point out the specific config settings necessary in httpd.conf (or elsewhere?) to get this scenario to work, that would be very much appreciated. Or has any other suggestions on running a non-root instance of apache for testing.</p>