server {
listen 80;
server_name test.com;
root "D:/test.com/";
location / {
index index.html index.htm index.php;
}
location ~ \.php(.*)$ {
rewrite ^/(.*)$ index.php/$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://test.com:8080;
}
}
I want to reverse proxy from port 80 of nginx to port 8080 of apache. How can I achieve the pseudo-static of .php?