Link to home
Start Free TrialLog in
Avatar of Tommienbp
Tommienbp

asked on

Authentication forwarden to another IIS server.

Hello, I've got an Apache Webserver where people are authenticated with PHP, MYSql. When a user is valid it can download files from another public IIS server. Access is denied when authentication is not valid on webserver 1.

I want people to download directly from the second server, because of the traffic.  In short, I grant people access to a server when they're authenticated on another.

Has anybody some suggestions how I could achieve this? Im prettty familiar with Apache, PHP, MySQL and stuff, but  I'm not so familiar with IIS.

Thanks for any help or suggestions.
Avatar of fz2hqs
fz2hqs

Sounds pretty bespoke so suspect there is nothing off the shelf. An idea:

Have all downloads go through some sort of asp / php page that page should do some negotiating with the apache server. Maybe your apache server would serve the link

http://iisserver.com/download.asp?userid=MYUSERID?file=MYFILE.DAT?IP=123.123.123.123

maybe some other parameters, you use the userid and ip to make a request to some sort of webservice on the Apache box - or better still directly to the MySQL database to confirm the bits are correct, then and only then you serve the data file. The ideal way of doing this on IIS is via an ISAPI  DLL however you will need to know something like C, VB or Delphi
Avatar of Tommienbp

ASKER

Hey fz2hqs thanks for your reply, but I think that would be too complicated.

Is there a way I could grant just one IP (the one of the apache server) access to the IIS Server? Then it would be easy. I could PHP get the files to the apache server and put them there somewhere for the authenticated user.

Only problem is the traffic for the apache server. I'd rather have them downloaded directly from the IIS Server.
You say it yourself that you are stuck in a catch 22 scenario. On one hand you want PHP on the apache server to manage everything, but you want to avoid the overhead of it being served.

A sanity check - Step back though and look at this another way, you are clearly worried about the Apache server gettin processor or memory bound which is why you are offloading this. This overhead really isn't that great, if you are worried about bandwidth then stop - it makes no odds what server it comes from, doubtless both have 10/100Mbps cards and are going to be bound by the restriction of the size of your link

It is more the extra costs of more bandwidth at my provider.
Then it makes no difference which server it comes from surely?
Well, the other one is not mine. :) (p.s. I'm dutch ;) )
ASKER CERTIFIED SOLUTION
Avatar of fz2hqs
fz2hqs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial