• Hello,
    I’ll try to be brief as possible.
    I have set up 2 2008R2 servers each with WAMP 2.1 which uses Apache2.2.17. On Server A the Apache document root and <Directory directive> has been changed from the default to D:www. I installed WP 3.2.1 into this document root in a directory called blog. The blog is working fine from the apache 2.2.17 instance on Server A.
    This [D:www]directory has been configured on Server A as both an NFS and SAMBA share using File Services-Share and Storage management.
    On Server B, WAMP 2.1 Has also been installed and the Apache document root in httpd.conf and the <Directory directive> is pointed at the Server A document root [D:\www] using the UNC format of //Server A/www/. Apache is also running on Server B as administrator to enable network access since the Local System account has no network access.
    Lastly I must state that all of this is located in a DMZ so there is no ‘domain’ or ‘domain accounts’ both servers are in workgoroup. So far I have not been able to get Server B to serve anything from the document root on Server A. Is this at all feasible???
    I’ve already read that Apache cannot use a mapped network resource as document root.
    Is there any way for Apache to serve wordpress from a non local i.e. network resource document root?
    Also, these are vmware 4.1 U1 virtual servers running on iscsi san.

    Thank You
    Joe Pitts

Viewing 3 replies - 1 through 3 (of 3 total)
  • [[Hey Joe, I noticed you cross-posted this to the Wp-Hackers mailing list. I’ll put the details here & then reply to that w/ a link so everyone centralizes.]]

    Setting up Apache to access network drives on Windows is a bit of a challenge, since you used WAMP it may have skipped some of the needed Win configs for services.

    Double-check permissions on Server B 1st:
    1) Administrative Tools > Services & find any services named “wamp*”, or “apache*”
    2) Make sure none of these services on Server B run as Local Service or Local System – use a workgroup account that has network-share perms. I know you’re in a DMZ, but WS2008 adds extra layers (Local Service, Network Service, or Local System, more: https://technet.microsoft.com/en-us/library/dd367859(WS.10).aspx). Also, I’d recommend creating an account just for this purpose, like “apachebalancer”
    3) Restart the changed services & test Server B

    [[Consider doing that same account-change on Server A (or maybe using “apachebalancerA” and “apachebalancerB”). This way, if a server ever fails then Server C, D, etc can just mirror the setup instead of re-debugging this.]]

    Even if the above worked you should still do this to have a true load-balanced setup. Because using //serverA/www/ as DocRoot on Server B means that if Server A goes down, then Server B won’t have access to the files either.

    1) Connect to the network drive on Server B using WSrv tools, https://technet.microsoft.com/en-us/library/cc770902.aspx (let’s assume that drive is setup as S:)
    2) Change the DocumentRoot on Server B to S:/www/ — I’m assuming you’re doing this for the main host & not a vhost, if not then you may have to use Apache’s alias setting in your vhosts config, https://httpd.apache.org/docs/2.0/mod/mod_alias.html#alias
    3) Restart apache* or wamp* services & test again.

    If both of those didn’t work then check your Apache logs on server B & post back the messages, and also note if the messages are different from before making these changes. Log locations should be set by one/both of these directives: ‘ErrorLog /logs/error.log’, ‘CustomLog /logs/custom.log’

    Oh yeah, and this setup isn’t truly “balanced” yet. This is a “redundant” setup but nothing you mentioned would distribute the load.

    You would still need to work on DNS (round-robin setup, still not truly balanced) or install a software load balancer. Consider ‘nginx’ (spoken: “engine X”), that’s what wordpress.com uses and it’s easier to setup than Apache: https://barry.wordpress.com/2008/04/28/load-balancer-update/

    Thread Starter jhp1

    (@jhp1)

    mbijon,

    Sorry about the cross posting.
    Thanks for your extensive reply and the links. I’ll get back to you as soon as I attempt to implement your suggestions.

    Thanks Again,

    Joe

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Load Balance Word Press’ is closed to new replies.