Blog On A Separate Server?

Joined
Dec 2, 2014
Messages
241
Likes
470
Degree
1
is it possible to host a site A.com on a server and then host a WordPress blog on that site on A.com/blog?

I know it's easy enough to do it with a subdomain of blog.A.com - but can it be done with a folder?

The motivation would be to keep separate servers for optimization and load balancing.
 
I believe doing it with folders is very hard/impossible.
You can setup load balancers for the whole domain with AWS or Google Cloud etc
 
In order to do it you have to do a reverse proxy setup for that directory inside your .htaccess (apache2) or nginx conf file at the server level. So when users are pointing to that directory the server sends that request to another server that "controls" that directory.

Now the only reason I know this is because of @SmokeTree when he explained it years ago to me. I never attempted it, just settled for subdomain scenario.

Google "reverse proxy subfolder to another server" with your http server type and Good Luck!

It can be done, just a bit complicating and you should really get someone that has already done it before, but it all starts with your http server config file.
 
As CCarter mentions, the only way to do it is to reverse proxy, but if your two servers are not on the same network (or VPC) you should forget about it as the latency will be huge on each calls (you add like a second to each request which is the same as insulting your readers).
 
Thanks - after looking into that a bit I think we'll also just go with a subdomain.

Don't want to have the extra complication that I just know is gonna cause further dev issues, plus the "main" server would still have the load of the request which is what we want to avoid in the first place.

A subdomain is never quite as cool but pros probably out weight the cons here which would mostly be aesthetic.
 
A subdomain is treated as a separate domain by Google for SEO purposes. Good if forums for example, bad if you want it to rank along with the main domain.
 
Miketpowell, to clarify, a reverse proxy will not create much additional load on your main server, because it's managed from the web server side (e.g. Nginx, Apache, etc.), you're maybe talking 0.001% of the server load needed to serve 1 query vs. a Wordpress page.
 
Miketpowell, to clarify, a reverse proxy will not create much additional load on your main server, because it's managed from the web server side (e.g. Nginx, Apache, etc.), you're maybe talking 0.001% of the server load needed to serve 1 query vs. a Wordpress page.

We are now implementing this and it was pretty slow from having to go through Apache twice pretty much. Would that issue be fixed by using Nginx?
 
Back