I'm trying to use both Nginx and Apache concurrently, and have the need to use PHP to execute a contact script.
I have set Apache
to listen on port 8080
, while Nginx
is listening on port 80
.
My first attempt was to do this within the config of Nginx:
location ~ \.php$ {
proxy_pass http://127.0.0.1:8080;
}
However when I attempted to execute the script online, it produced the following:
http://puu.sh/aCy05/d072e3052d.png
How do I configure Nginx so that it redirects the request through Apache (running PHP) and executes the script?