Koozali.org: home of the SME Server

Hostname location issue

CKConsulting

Hostname location issue
« on: January 26, 2007, 02:50:59 PM »
I can't see my second SME7 box from the internet it just shows the webpage of box 1.  Internally all works fine.

Box 1 is SME7 as a firewall (ckconsulting.net)  x.x.x.1
Hostnames and addresses is configured to
ocs.ckconsulting.net
location = local x.x.x.12

Box 2 is SME7 stand alone  (ocs.ckconsulting.net)


Thanks
Rick

Offline haymann

  • *
  • 212
  • +0/-0
Hostname location issue
« Reply #1 on: January 26, 2007, 03:14:28 PM »
I have never been sucessful in making that work either. I have had to setup a port forwarding rule to access the other sever from the internet. I have pointed a different port (like 8080) to the other, local server. (http://ckconsulting.net:8080 points to ocs.ckconsulting.net)

I think that ProxyPass might possibly work to accomplish what you (and I as well...) want, but I don't understand how to make it work yet...
Ryan

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Hostname location issue
« Reply #2 on: January 26, 2007, 03:19:32 PM »
I don't know why you would need two servers on one line. Isn't one enough?
"It should just work" if it doesn't report it. Thanks!

Offline haymann

  • *
  • 212
  • +0/-0
Hostname location issue
« Reply #3 on: January 26, 2007, 03:29:45 PM »
Quote from: "bpivk"
I don't know why you would need two servers on one line. Isn't one enough?
For myself... There are a few web apps that either can't be installed on SME or I have not been able to figure out how to. Much easier to setup another CentOS box to host things like Scalix (not that I have that working yet...), Zoho Virtual Office (until I get Scalix running), and AdventNet ServiceDesk Plus.

I don't need another web server for webpages, SME has plenty of i-bays for that!

Now if I ever take the time to install VMware then these could be virtual machines, but would still need forward ports or figure out how to make http://email.mydomain.com point to my virtual server...
Ryan

CKConsulting

Hostname location issue
« Reply #4 on: January 26, 2007, 03:36:51 PM »
I'm constantly trying new apps and it's easier to build them on a fresh SME box's and figure out all the bugs, and test and then decide weather to put them on my production SME box or not.  I also user VMware to test apps and OS's.

I'll try the port forwarding but it would be nice if could get hostnames to work.

Rick

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Hostname location issue
« Reply #5 on: January 26, 2007, 04:01:19 PM »
Quote from: "haymann"

I think that ProxyPass might possibly work to accomplish what you (and I as well...) want, but I don't understand how to make it work yet...
Ryan


I think there is a contrib to make it easy.

I played with the command line and got it working.

Requirement:
Internal server with web application eg: http://192.168.0.5/killer-app
A description of killer-app eg: lotto-number-picker
Url for internet user eg: http://www.domain.name/lotto

So, on command line
Code: [Select]
db accounts set lotto ProxyPass Description lotto-number-picker Target http://192.168.0.5/killer-app
expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/rc7.d/S86httpd-e-smith restart
Regards,
William

IF I give advise.. It's only if it was me....

Offline haymann

  • *
  • 212
  • +0/-0
Hostname location issue
« Reply #6 on: January 26, 2007, 06:17:08 PM »
Thanks William, I appreciate your help. Your example made more sense to me that the example in the ProxyPass contrib that I have had installed for awhile.

Edit: I had posted a problem I was having, but it turns out I had a typo...

Offline pfloor

  • *****
  • 889
  • +1/-0
Hostname location issue
« Reply #7 on: January 27, 2007, 04:14:21 AM »
You can also try the now built-in proxypass in SME 7

# db domains set ocs.ckconsulting.net domain Nameservers internet
# db domains setprop ocs.ckconsulting.net ProxyPassTarget http://x.x.x.12/
# db domains setprop ocs.ckconsulting.net TemplatePath ProxyPassVirtualHosts
# signal-event domain-create ocs.ckconsulting.net
In life, you must either "Push, Pull or Get out of the way!"

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Hostname location issue
« Reply #8 on: January 27, 2007, 04:33:08 AM »
Quote from: "pfloor"

# db domains setprop ocs.ckconsulting.net TemplatePath ProxyPassVirtualHosts


What does that do ?
Regards,
William

IF I give advise.. It's only if it was me....

Offline pfloor

  • *****
  • 889
  • +1/-0
Hostname location issue
« Reply #9 on: January 27, 2007, 06:02:11 AM »
Not quite sure but it appears that it tells where the templates for proxypaths are located so it expands the correct template to create the proxypass entry into httpd.conf instead of a normal domain entry.

But what the heck do I know?
In life, you must either "Push, Pull or Get out of the way!"

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Hostname location issue
« Reply #10 on: January 27, 2007, 06:13:09 AM »
Thanks.

Just found where it lives..
Code: [Select]
[root@c3 templates]# grep -r 'TemplatePath' . |more
./etc/httpd/conf/httpd.conf/80VirtualHosts:     my $templatePath = $domain->prop('TemplatePath') || 'VirtualHosts';
Regards,
William

IF I give advise.. It's only if it was me....