I am trying to redefine the header of the http host that is passed to my php application (in particular Phabricator ) when using fastcgi_pass.
I found many examples for this using proxy_pass, but I cannot find an example of how to do this with fastcgi_pass. In particular, I would like the php proxy application to see the host header as "phabricator.localhost".
(The reason for this is because I want to associate several different domains with the Phabricator web server, but it allows only one domain to communicate and rejects any requests not made by that single domain.)
I am new to configuring Nginx with FastCGI, so I'm not sure how fastcgi works. Any help is appreciated.
Here is my Nginx server configuration:
server { server_name phabricator.localhost www.example.com example.com; root /opt/phabricator/phabricator/webroot; location / { index index.php; rewrite ^/(.*)$ /index.php?__path__=/$1 last; } location = /favicon.ico { try_files $uri =204; } location /index.php { fastcgi_pass localhost:9000; fastcgi_index index.php;
php nginx fastcgi phabricator
Joe j
source share