Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding out what user Apache is running as in windows?

Tags:

apache

I am new to Windows and I am trying to figure out what user Apache is running on. In Linux I had a simple command ps aux | grep apache. How do I find that out in windows? Is it some where in httpd.conf file?

like image 427
John Harris Avatar asked Apr 23 '12 22:04

John Harris


People also ask

How can I tell what user Apache is running as?

Look in your httpd. conf for the "User" directive. It will tell you what user apache will run as.

Who is running Apache?

The Apache HTTP Server (/əˈpætʃi/ ə-PATCH-ee) is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.

What is the default user for Apache?

By default, Apache uses www-data user in Ubuntu/Debian and apache in CentOS/Redhat/Fedora to access your website files and run system commands. However, sometimes you may need to use a different user & group for your website files. Here are the steps to change Apache user.


1 Answers

You can include a line of code in your PHP script:

echo exec('whoami');
like image 121
PPPPPPPPP Avatar answered Oct 21 '22 15:10

PPPPPPPPP