Finding out what user Apache is running as in windows?

前端 未结 4 1615
失恋的感觉
失恋的感觉 2020-12-10 13:00

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 ou

相关标签:
4条回答
  • 2020-12-10 13:35

    By default the Apache services are registered to run as the system user (the LocalSystem account).

    The section "Running Apache as a Service" in the help documentation below might help you configure Apache the way that you want to.

    http://httpd.apache.org/docs/2.0/platform/windows.html

    0 讨论(0)
  • 2020-12-10 13:36

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

    echo exec('whoami');
    
    0 讨论(0)
  • 2020-12-10 13:40
    1. Bring up the task manager by pressing Ctrl+Shift+Esc.
    2. Go to the Processes tab and sort by Image Name. In Server 2012, go to the Details tab and sort by Name.
    3. Look for apache.exe (or httpd.exe) and check the User Name column.
    0 讨论(0)
  • 2020-12-10 13:40

    In Powershell you can interrogate the registry for the user context the service is running under:

    (Get-ItemProperty HKLM:\system\CurrentControlSet\Services\Apache2.4).ObjectName
    
    0 讨论(0)
提交回复
热议问题