I got two servers: Webserver (Windows-IIS/php) and Linux Execution server (I can put an Apache server if its needed)
My php app on the WebServer generates a xml file which will be used by a command executed on the linux server.
What is the best way to configure these two server?
XML file sharing between two servers
Moderator: General Moderators
Re: XML file sharing between two servers
The awesome thing about webservers, is that they are just another way to share files... I would recommend putting the generated XML file someplace that the linux box can access it via http (i.e. someplace on the php server that the linux box can access it over the web, if you are worried about security, just setup a .htaccess on the file that only allows the linux boxes ip address to get anything in the directory), and then use wget (you probably want to add the right arguments to wget so that it overwrites the file when it downloads it, instead of doing it's default behaivor where it appends a .N to the end) to fetch the xml file before running the linux command... It will make things REALLY simple.
Good luck!
Joey
Good luck!
Joey
Last edited by joeynovak on Fri Jul 31, 2009 3:16 pm, edited 1 time in total.
Re: XML file sharing between two servers
If both machines are in the same network segment you can simply share the directory containing this file ("File and printer sharing") and access this shared folder from the Linux server by using this commands:
(run once)
(run at start up)
where:
/mnt/win-shared is the Linux directory where the Windows shared directory will be accessible
user_name_with_access -....
user_password -....
//192.168.2.180/shared - the address of the Windows machine together with the shared folder.
Code: Select all
mkdir /mnt/win-sharedCode: Select all
mount -t smbfs -o username=user_name_with_access,password=user_password //192.168.2.180/shared /mnt/win-sharedwhere:
/mnt/win-shared is the Linux directory where the Windows shared directory will be accessible
user_name_with_access -....
user_password -....
//192.168.2.180/shared - the address of the Windows machine together with the shared folder.
There are 10 types of people in this world, those who understand binary and those who don't