I have two web sites:
I want to publish these sites as following:
foo.com/wp
refers to (b) foo.com
refers to (a) Is it possible?
You can use (a) and (b) behind a proxy (c) -- NGINX is my personal preferred server for that purpose because it is insanely fast and good on resources.
http://nginx.org/en/docs/beginners_guide.html#proxy
You'd do something like this:
server {
location / {
proxy_pass http://localhost:{port for a}/;
}
location /wp {
proxy_pass http://localhost:{port for b}/;
}
}
** note that {b} will know that it is at /wp. If you need the backend server to think that it's at root (/), you can do it with a rewrite (also in the NGINX docs)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.