Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Host a directory on another server?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Host a directory on another server?

PremiumNPremiumN Member

So say i have example.com and i want this on a seperate server to example.com/blog.

How can i do this? I know that using a subdomain such as blog.example.com will be easier but for SEO purposes, i want to have the blog on a directory instead of a subdomain.

Thanked by 1manacit

Comments

  • zionvpszionvps Member

    The only way i can think of is mount the remote directory on local server using some scripts

  • through dns like cloudflare very easy

  • AlexanderMAlexanderM Member, Top Host, Host Rep

    @sz1hosting said:
    through dns like cloudflare very easy

    What.

  • you want to use a subdomain on another host go to dns eg: sub.domain.com points to a record 55.55.55.5 well in cloudflare you can do that anyways

  • nerouxneroux Member

    @sz1hosting said:
    you want to use a subdomain on another host go to dns eg: sub.domain.com points to a record 55.55.55.5 well in cloudflare you can do that anyways

    No subdomain in this case.

  • oh i see ok lol i tried ^_^

  • VPNVPN Member

    @sz1hosting said:
    you want to use a subdomain on another host go to dns eg: sub.domain.com points to a record 55.55.55.5 well in cloudflare you can do that anyways

    OP clearly said they know it can be done with a sub domain easily but for SEO wants to be able to do it as a domain.com/blog rather than blog.domain.com

  • not possible as far as i know, though redirect may be the answer

  • nerouxneroux Member

    @sz1hosting said:
    not possible as far as i know, though redirect may be the answer

    Directly, no.

  • netomxnetomx Moderator, Veteran

    @sz1hosting said:
    not possible as far as i know, though redirect may be the answer

    Please stop posting if you don't know what are you talking about, thanks.

    /rant

  • sz1hostingsz1hosting Member
    edited May 2014

    ok thank you

    Thanked by 1linuxthefish
  • rm_rm_ IPv6 Advocate, Veteran
    edited May 2014

    Possible via the use of Reverse Proxying at the example.com server. However you'll still be using bandwidth of the main server (with consumption multiplied by two, actually), and as all requests will go through it, this will result in a latency increase. Also there might be problems with logging or distinguishing visitors from one another (for the server handling the /blog part it will look like everyone comes from the base server's IP).

    Bottom line, cut the "SEO" crap, migrate to proper subdomains if you need to host on multiple servers.

    Thanked by 1linuxthefish
  • Using nginx?

    location /blog { proxy_pass http://myotherserver.com/blog/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; }

    Thanked by 2netomx ihatetonyy
  • RizRiz Member

    Use bittorrent sync to monitor the remote folder, and grant read only access to the webserver.

  • msg7086msg7086 Member

    Either do it on the web server level, i.e. reverse proxying to remote server

    or

    Do it on the file system level, i.e. use sshfs / glusterfs / whatever else to mount a remote directory to the server

  • Neither are really good solutions though. I don't know, search engines are important but I feel like bowing down to the god of SEO is overkill.

    Thanked by 1linuxthefish
  • wiffelwiffel Member

    using lighttpd:

    server.modules += ( "mod_proxy" )
    
    $HTTP["url"] =~ "^/blog($|/)" {   
       proxy.server  = ( "" => (( "host" => "111.222.333.444" )))
    } 
    
  • Interesting @wiffel, never done it with lighthttpd before. Does that forward the real IP etc in headers?

  • wiffelwiffel Member

    @AThomasHowe said:
    Interesting wiffel, never done it with lighttpd before. Does that forward the real IP etc in headers?

    Depends on what you mean. It does add X-Forwarded-... and X-Host, ... to the headers.
    There is a patched version of mod_proxy that does not do that, but I never tried that one myself.

    I'm not sure if that answers your question ? You can find some more info about it at the bottom of the page about mod_proxy.

  • user123user123 Member

    Why not just create a framed webpage as the index page in the /blog folder? I think that would be the easiest solution.

  • earlearl Member

    Not sure if it will work for what you need, but can you not use a redirect?

    So for server B where you installed the blog create a subdomain say serverb.example.com/blog then have example.com redirect to serverb.example.com/blog.

    I know in freedns when you use the cloak tag it will keep the example.com url from changing to serverb.example.com/blog.

  • derpderp Member
    edited May 2014

    deleted - already mentioned.

  • If you're using Apache you do accomplish this with a reverse proxy using mod_proxy.

  • user123 said: Why not just create a framed webpage as the index page in the /blog folder? I think that would be the easiest solution.

    If SEO is the goal an (i)frame will not help one bit... and why would you do that in 2014 anyway? iframes only real good uses are like those used by YouTube for easy embedding ;_;

Sign In or Register to comment.