Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Thomas on December 18, 2004, 06:22:45 AM
-
I have SME 6.01 setup and I installed the Proxypass contrib. What I want to do is redirect requests to www.mywebsite.com/win2k to a Windows 2000 server running a .net web based application. I made a URL Proxypass entry for my Win2k box but when you try to access www.mywebsite.com/win2k the browser times out. Can this be done and what am I doing wrong?
Thanks,
thomas
-
Dude I've been hangin over this problem also, along with another thread http://forums.contribs.org/index.php?topic=25160.0
I've yet to see a working solution.
I got my proxypass to work by adding
ProxyPass /othersite/ http://otherserver/
<Location>
order deny,allow
deny from all
allow from all
</location>
to a httpd.conf template in /etc/e-smith/template-custom/httpd/conf/httpd.conf/atemplate - path is from memory so may be out a bit
note tho that when you restart the httpd the main httpd.conf file is'nt always updated from the template so check it if nothings working, if it doesnt update, I suggest deleting the template then edit the main httpd.conf directly.
This method should take you to the index page on the other server, to access further pages is the problem as links will have to be hardcoded with the outside url rather than just the dir path. eg
<a href="http://globalserver/othersite/apage.html">apage</a>
rather than
href="apage.html">apage</a>
This of course would screw up viewing the pages from inside the network. I'm working on the problem, but if anyone else has an idea to solve please feel free to divulge.
-
Well, I find that if I type in a url for a .html file the proxypass works. If I type in a url for a .aspx file in the same directory as the .html file then I get this (from Firefox browser)
"The requested URL /Area62/assqvr55g2md2nzhe2zicg45)/Secure/login.aspx was not found on this server."
I've searched the forums at www.asp.net and found some related stuff but no answers. I'll keep trying. Thanks for posting.
Thomas
-
I dont know if I have got the right end of the stick here .. I had an issue where the sme server on site was the FQDN (smeserver.thisdomain.com) but the web for that domain (www.thisdomain.com) was hosted off site.
I simply pointed www.thisdomain.com to the IP of the website in the HostNames and addresses option. visibility and location were both set to local.
Could you not add the www.mydomain to this list, remove all other options, then point it to the IP of your server ?? Just a thought. I then set this domain to not require a password in the proxy password admin screen,(list of domains not requiring password) thereby making it available to everyone - even those who had no account here (ie general internet access)
-
I got my proxypass to work by adding
ProxyPass /othersite/ http://otherserver/
<Location>
order deny,allow
deny from all
allow from all
</location>
to a httpd.conf template in /etc/e-smith/template-custom/httpd/conf/httpd.conf/atemplate - path is from memory so may be out a bit
note tho that when you restart the httpd the main httpd.conf file is'nt always updated from the template so check it if nothings working, if it doesnt update, I suggest deleting the template then edit the main httpd.conf directly.
That's because when you finish editting the custom template you must re-expand the template for the updates to be incorporated. i.e /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
Then service httpd restart
JB
-
I have the Proxypass contrib installed and in the ProxyPass server manager panel I setup a "URL" proxypass instead of a "Virtual Domain" proxypass. Wonder if this matters?
Thomas
-
That's because when you finish editting the custom template you must re-expand the template for the updates to be incorporated. i.e /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
Ah ha, thx.
Well, I find that if I type in a url for a .html file the proxypass works. If I type in a url for a .aspx file in the same directory as the .html file then I get this (from Firefox browser)
"The requested URL /Area62/assqvr55g2md2nzhe2zicg45)/Secure/login.aspx was not found on this server."
I've searched the forums at www.asp.net and found some related stuff but no answers. I'll keep trying. Thanks for posting.
The ProxyPass will only pass on requests to a destination when the request is made to the address specified in the ProxyPass on the forwarding server.
If your ASP page is referring to pages on it's location, you will be redirected using the local address. If you check your browser on an internal machine you will see the address chage to look directly at the serveing box, it will not go through the forwarding box (ie where the ProxyPass is made).
You may have to write your ASP pages to interrigate the http request and extract the initial part of the URL. eg
http://globalserver.com/thesite/indext.asp
grab the http://globalserver.com/thesite/
and output back to the client the address
http://globalserver.com/thesite/nextpage.asp
Does that make any sense?[/code][/quote]
-
Actually if I type in URL just asking for a .aspx page it says it can't be found. This isn't being redirected to another webpage on the .Net box, just a simple .aspx page. So, from that I think Apache doesn't know what to do with a page with the .aspx extension. I hope I have explained myself well enough, any thoughts on this?
Thanks,
Thomas
-
I renamed the page login.aspx to login.html on the .Net server. When I access this page from the internet, www.mysmeserver/myproxypassurlsetup/login.html I see the html in this page displayed correctly. If I try to do the same thing with the page named login.aspx then apache returns page can't be found.
Thomas
-
What is your asp code doing?
-
Well, it's asp.net code not asp code.
Actually all the page does is display two fields that a user enters a username and password then clicks an ok button. But, just to load the .aspx page in a browser does not require any of the asp.net code to run, at that point it's just html code!!! That's my point, apache will not load a .aspx page.
Thomas
-
Have you set apache to recognise the .aspx extension in the apache.conf?
-
No, how do I do that? Thanks for trying to help by the way!!!
Thomas
-
Sorry it's httpd.conf not apache.conf.
Assuming you've used the command prompt.
login as root
pico /etc/httpd/conf/httpd.conf
look for the line DirectoryIndex
you will see already index.html index.shtml index.cgi etc
Now add after the last entery
index.aspx index.asp
then save ctl+o and ctl+x to exit.
Now restart the http deamon by typying
/etc/rc.d/init.d/httpd restart
the prompt should say:
Stopping httpd: [ok]
Starting httpd: [ok]
now see of it loads your asp page.
Strictly speaking you should edit the custom-templates for the httpd.conf but for DirectryIndex I feel it's ok.
Lastly if this fixes your problem I will be surprised, but at the moment that's all I cant think of.
-
Nope, didn't help. Hey, we'll just keep trying!
Thomas
-
I found this at asp.net http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=427756 where he claims to have accomplished what we're trying to do here. One thing I noticed is he is using Apache version 2.0. Which version of Apache does SME 6.01-01 use? Do you think this could be the difference?
Thomas[/url]