Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Make mod_proxy_fcgi work in windows without patch |
|
Author |
|
viruscamp
Joined: 18 May 2022 Posts: 1 Location: US,NY
|
Posted: Wed 18 May '22 17:01 Post subject: Make mod_proxy_fcgi work in windows without patch |
|
|
I have found a valid conf for mod_proxy_fcgi in windows, which fix the problem in thread:
https://www.apachelounge.com/viewtopic.php?t=7873
Code: |
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
<Files ~ "\.(php|phtml)$">
SetHandler "proxy:fcgi://127.0.0.1:9000//./"
ProxyFCGIBackendType GENERIC
</Files>
|
Then it's better to use https://github.com/deemru/php-cgi-spawner to act as php-fpm, and use nssm to wrap it as a windows service
Code: |
php-cgi-spawner.exe "c:/php54/php-cgi.exe -c c:/php54/php.ini" 9000 2+8
|
Code: |
[proxy_fcgi:trace8] mod_proxy_fcgi.c(385) AH01062: sending env var 'SCRIPT_FILENAME' value '//./C:/httpd/www/test.php'
|
And there are two more methods which may less efficient
Code: |
# use # end url and preappend a driver letter
SetHandler "proxy:fcgi://127.0.0.1:9000#"
ProxyFCGIBackendType GENERIC
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "C:%{reqenv:SCRIPT_FILENAME}"
|
Code: |
# use / end url and use regex to remove the first /
# from
SetHandler "proxy:fcgi://127.0.0.1:9000/"
ProxyFCGIBackendType GENERIC
ProxyFCGISetEnvIf "reqenv('SCRIPT_FILENAME') =~ m#^/?(.*)$#" SCRIPT_FILENAME "$1"
|
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 07 Jun '22 12:10 Post subject: |
|
|
Thank you for sharing |
|
Back to top |
|
|
|
|
|
|