Apache running as me
I have setup server with Apache (Centos 8) but it looks like I have Apache running under my user account.
Is that bad ? my account has access to sudo, Should I create another user and have it running as that user? If so how do I do that, thanks for your help |
yes, it is not the suggested configuration. I think you can specify the user in httpd.conf. Usually a user is created for this: www-data
|
How did you set up Apache? Did you install it from the repositories?
By default CentOS configures apache to run as user apache. ps aux | egrep '(apache|httpd)' |
Thank you both for the reply here is the output of PS, As you cans see it is showing root on one process and my username near the bottom of the list
Code:
[JamesMore@myServername ~]$ ps aux | egrep '(apache|httpd)' |
Sorry tweaked the PS output to not show my user name (This might have made me think my user was running apache)
Does this look ok from my limited knowledge apache is stated as root and then the child processes are ran as the user apache Code:
[JamesMore@myServername httpd]$ ps aux | egrep --color '([a|A]pache|[h|H]ttpd)' |
The user running the web server (httpd) is apache.
The line with your username in #4 is the grep command...has nothing to do with httpd. It matches your grep....(doh) Your conclusion in #5 is correct. Please use code tags when posting output. See the link in my signature. |
Quote:
I found it handy to search ps output using: Code:
$ ps -ef | grep something | wogrep Code:
$ alias wogrep='grep -v grep' # Put it $HOME/aliases and source it in your profile HTH... |
I usually just enclose the first character in square brackets similar to what the OP did in #5.
Code:
ps -ef | grep [s]omething |
Quote:
Still, your point is valid...one shouldn’t mess with what the out-of-the-box installation wants to do. |
All times are GMT -5. The time now is 01:30 AM. |