2tonejoe Posted December 17, 2007 Share Posted December 17, 2007 I have a web server that on an internal network that is available to the outside world. We will call it server A. I also have web servers B,C,D,E on the internal network and are not available to the outside world. I want to be able to have a visitor, from the outside word, visit the server A and view the contents of pages on servers B,C,D,E via a DIV or iFrame. How can I do this via php? Quote Link to comment Share on other sites More sharing options...
rajeshrr Posted December 17, 2007 Share Posted December 17, 2007 This is difficult to do without handling your firewall. You need to access to the internal servers for inbound call. But you can change the to a different port than using the default port 80(http) and then call the URL using the port no in the server A:new_port in your iframe scr parameter. Let me know this helps. Regards Rajesh R R ________________ www.rajeshrr.com ------------------- Dreams are for ever ------------------- Quote Link to comment Share on other sites More sharing options...
2tonejoe Posted December 17, 2007 Author Share Posted December 17, 2007 well. . . . i was hoping there was some kind of wget or curl thing. the ports confuses me a little. Quote Link to comment Share on other sites More sharing options...
2tonejoe Posted December 18, 2007 Author Share Posted December 18, 2007 :bump: Quote Link to comment Share on other sites More sharing options...
steviewdr Posted December 20, 2007 Share Posted December 20, 2007 Take a read of: http://wiki.kartbuilding.net/index.php/Apache#Apache_Rewrite_via_mod_proxy mod_proxy is what you want to use. -steve Quote Link to comment Share on other sites More sharing options...
2tonejoe Posted January 9, 2008 Author Share Posted January 9, 2008 can someone give me an example of how to use this with with a dynamic link. . .I mean. . . .example: i have a LAN address of 'http://111.111.111.111/searchImage.php?img='. This is only accessible internally. I want to be able to have a user to the website, from an external network, enter in an image name (ie: bigbeercan) that I will route internally as 'http://111.111.111.111/searchImage.php?img=bigbeercan'. Then show the results of the web request to the external user. . . I think mod_proxy is right, I am just confused on how to go about getting this to work. . Quote Link to comment Share on other sites More sharing options...
steviewdr Posted January 10, 2008 Share Posted January 10, 2008 Put the following in a .htaccess here: externalserver/websiteroot/searchfolder/.htaccess ######### RewriteEngine on Rewriterule ^(.*)$ http://111.111.111.111/$1 [P] ######### Then accessing via the URL: http://externalserverip/searchfolder/searchImage.php?img=bigbeercan will behind the scenes return: http://111.111.111.111/searchImage.php?img=bigbeercan -steve Quote Link to comment Share on other sites More sharing options...
2tonejoe Posted January 13, 2008 Author Share Posted January 13, 2008 is there something I need to turn on in apache? I have it setup like the following: .htaccess inside of folder 'image': ######### RewriteEngine on Rewriterule ^(.*)$ http://111.111.111.111/CGI/findphoto/$1 [P] ######### outside url: http://production.tradermediausa.com/scripts/image/34123890239 this is returning a 404 error. am I doing something wrong? Quote Link to comment Share on other sites More sharing options...
steviewdr Posted January 14, 2008 Share Posted January 14, 2008 1. Make sure mod_proxy is enabled in httpd.conf 2. Make sure mod_rewrite is enabled in httpd.conf 3. Check access.log and error.log on BOTH http://111.111.111.111 and http://production.tradermediausa.com On your private lan/111.111.111.111 server make sure the following works: http://111.111.111.111/CGI/findphoto/34123890239 If the above ^ doesnt work locally, then it wont work externally. Try it first with a simple image with no script. Put "image.jpg" in http://111.111.111.111/CGI/findphoto/ Try and access it via: http://production.tradermediausa.com/scripts/image/image.jpg -steve Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.