Koozali.org: home of the SME Server

need help with forwarding webpage

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
need help with forwarding webpage
« on: July 10, 2009, 05:59:48 AM »
hi,

i need help with forwarding webpage, i have sme 7.4 and xp with wampserver.

what i need is to have have:

http://mydominan.com/wampserver

i tried adding hostname local but the output is

http://wampserver.mydominan.com/

just like having ibays, any one can help me?

thanks,
Nef Kho  :-) .........

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: need help with forwarding webpage
« Reply #1 on: July 10, 2009, 03:06:34 PM »
We need some more info, I think.

It looks as though "wampserver" is a windows "apache, mysql, php" platform, so I assume it isn't running on your SME directly.

That leads me to assume that you have your SME server setup in server-gateway mode, with a "wampserver" setup on your internal network, and that you're trying to use "proxypass" to pass a specific ibay (or alternate domain) to the internal wampserver.

Is all of this correct so far?

If you want to get access to the wampserver from off-site using a different hostname than the one used by your SME server, have you configured that hostname in your public DNS?


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: need help with forwarding webpage
« Reply #2 on: July 10, 2009, 03:21:35 PM »
I suggest you conigure a proxypass to your internal WAMP server: http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
Re: need help with forwarding webpage
« Reply #3 on: July 11, 2009, 02:37:08 AM »
thanks, mmccarn that is correct, but i dont need the wampserver to be accessible externally, all i need is if i access my wampserver locally, i would have to www.mydomain.com/wmapserver just like having an ibay would it be possible?

i have sme and xp for the wampserver.

:)

thanks,
Nef Kho  :-) .........

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: need help with forwarding webpage
« Reply #4 on: July 11, 2009, 04:09:12 PM »
I can think of three options:

ProxyPass
Figure out how to do what you want using Apache's ProxyPass directive (Apache docs here, SME Virtual Domain Howto here, forum post with details for using ProxyPass to access Outlook Web Access here)

ProxyPass will do what you want, but you'll end up needing some custom template fragments (I think).

Start by editing /etc/httpd/conf/httpd.conf; once your customizations work, put them into a custom template fragment named something like /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95wampserver (the "95" is used by SME to determine where the template fragment will go in the output file; you may need to pick a different number to put the output at an earlier point in httpd.conf).

As long as you are modifying httpd.conf directly, you can easily undo any mods that cause problems using
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf; sv restart httpd-e-smith
http redirect
You could simply setup an http redirect in the "wampserver" ibay on your SME to redirect local users to the local address of the wampserver; put some code like that shown below into /home/e-smith/files/ibays/wampserver/html/index.html:
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    <head>
        <title>nefkho net</title>
        <meta http-equiv="REFRESH"
        content="0;url=http://wampserver.mydomain.com"></HEAD>
        <BODY>
        You are being redirected to the wampserver
        </BODY>
        </HTML>


iframes
You may be able to do something similar using iframes:
Code: [Select]
<html>
<iframe src ="http://wampserver.mydomain.com" width="1024" height="768" </iframe>
</html>
« Last Edit: July 11, 2009, 04:13:26 PM by mmccarn »

Offline nefkho

  • *****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
Re: need help with forwarding webpage
« Reply #5 on: July 13, 2009, 03:28:57 AM »
thanks,

will test the last 2 options and see which one is better :)

Nef
Nef Kho  :-) .........