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?
Look in your httpd. conf for the "User" directive. It will tell you what user apache will run as.
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.
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.
You can include a line of code in your PHP script:
echo exec('whoami');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With