I am not really sure how to even search for this since most of my searches have came up with odd results.
What I am trying to do is use two servers to host a website. Server 1 already has the main website running with IIS, PHP and MySql. Server 2 has IIS, PHP, MySql and a Website installed similar to a Wordpress or Drupal. I would like to be able to call up a directory via our mainwebsite (i.e. ourwebsite.org/wordpress) and have that use the site that is currently on Server 2.
I have been able to do this using virtual directories but any time a php file calls for a file that is not in the website folder on Server 2 (i.e. c:/windows) it refuses to work.
It should be noted that Server 2 can read that file that is not in the web directory if I go to the Server 2 website on Server 2 by typing in http://localhost or by calling the DNS name of the server in a browser as long as I'm in the network.
When using the ourwebsite.org/wordpress link with the virtual directory it is searching on Server 1's hard drives for that file. It also appears to be using the MySQL database and PHP config from Server 1 as well.
Any suggestions on what to look in to or what to do would be greatly appreciated. I hope I made this clear.
So I imagine you have set your virtual directory on server 1 to use a share on server 2? Are your servers a part of a domain? If so, then you'll need to set the server 1 computer account for delegation in AD. If not, then you'll need create user account on each server for use with IIS that has exactly the same username and password. Have a look at the guide I wrote on creating user accounts for IIS 6.
----------------
Dominic Ryan
5 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
Thanks for the reply. The servers are part of a domain and your first assumption is correct as well. Server 1 is connecting to Server as an administrator account at the moment. I have read that may not exactly be the safest but at this moment I'm just trying to get it to work.
I have no problem connecting to Server 2 via virtual directory and displaying a page that says "Hello World" or some simple stuff.
The problem occurs when I have page on Server 2 set up with code that is trying to access files on Server 2 outside of the web directory. The website is looking for them on Server 1.
How have you got authentication set on server one (anonymous, Windows Intergrated, etc)? Have you configured delegation for the computer account? Is there anything in the eventlog or PHP log? I'm wondering if an include or similar is causing this issue.
----------------
Dominic Ryan
5 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
Just realised what was different last time I came across this. Last time the paths in the includes were UNC, so \\servername\share rather than c:\path. It is in this situation that you require the computer account be trusted for delegation.
Your situation is the opposite where IIS is connecting to the UNC, and your PHP app is referring to the local file system. You could try editing the ABSPATH value in your wp-config.php so that is referring to the UNC rather than the local file system. Indecently, are you using FastCGI or ISAPI?
----------------
Dominic Ryan
5 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
Location: Melbourne, Australia
Joined: Sep 2003