Is it possible that WAMP runs httpd.exe as the user [itself] instead of the local system?

I am running a django application on top of apache using mod_wsgi using WAMP.

A specific URL allows me to transfer the contents of image files whose paths are stored in the database.

Files can be found on the local computer or under a network drive ( \\my\network\folder ).

With the development server (manage.py runningerver), I have no problem reading and streaming files.

With WAMP and network drive files, I get IOError : obviously, because the httpd instance does not have read permission on the specified drive.

In the task manager, I see that httpd.exe is running SYSTEM . I would like to tell WAMP to start the server as [I], since I have read and write permissions in the public folder. (ultimately, the production server must be started by the user "www-admin" with permissions)

Mapping a network share folder to a drive letter (Z: for example) does not solve this at all.

The User / Group directives in httpd.conf do not seem to affect Apache behavior.

I also edited: I tried duplicating the HKLM\[...]\wampapache in HK_CURRENT_USER\ and renaming the original key, but then the new key does not seem to be found when I smd it

 > httpd.exe -n wampapache -k start 

or when I start WAMP.

I'm out of ideas :)

Has anyone had the same problem?

+7
apache wamp
source share
3 answers

Win + R, services.msc

change wampapache and wampmysqld to login as some user.

tray icon - convenient interface for "net start wampapache" and "net start wampmysqld"

+14
source

The User / Group directives in httpd.conf do not seem to affect Apache behavior.

httpd.exe is started by the root user (which is probably why you see that it is running SYSTEM). The user and group lines in httpd.conf determine which user will process the child processes (these are httpd spawns). These forks are what actually handles page requests, etc., so it’s possible that your configuration is already doing what you want, just unclear, looking at the task manager.

You can also try using runas to run WAMP / Apache, although your mileage may vary.

+1
source

I just found that doing work with httpd.exe works for me ... I just lost all the funk icon of the WAMP board and the menu item "restart apache", which is very convenient when I update the application code ...

I need to deal with this at the moment ...

0
source

All Articles