Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: solo on August 05, 2007, 03:46:58 AM
-
I have been running sme server for a few weeks now. I've already had a linux/apache server up but wanted to implement more security, simplify virtual domains, and add more features to my network.
I cannot get the sme server to use my linux/apache server for one of my domains. Under "Hostnames and Addresses" I configure the www."domain".com to point to my local machine, and on my local network the website works fine. However, when others try to access the site externally they get the default "This website is under construction" message.
I know very little about DNS and am at my wits end.
Thanks,
Solo
-
I believe you will need a contrib named "proxypass". Do a search in the SME 7.X contribs area.
-
Thank you I think your spot on; however, I installed proxypass and it still won't work.
I do think a type of "reverse proxy" will work. Now I just need to figure out an effective way of implementing one.
Frankly, I don't know which apache configuration file to edit.
-
ProxyPass is now built into SME7
db domains setprop www."domain".com TemplatePath ProxyPassVirtualHosts ProxyPassTarget http://IP.Address.of.internal.server/path_if_needed/
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart
-
Also, if you have www."domain".com set up as a virtual domain, remove it. You want SME to pass requests directly to the internal server.
-
THANK YOU! Got it working, Finally.
Problem:
Your web server(s) are located on your internal network behind your SME Server & Gateway; however you want outside users to be able to access the site.
Solution:
(server-#) nano /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/26reverseproxydir
Add (customize capitalized text):
{
if ( $virtualHost eq "DOMAIN.COM" ) {
$OUT .= " # theses dirs are reverse proxyed to an internal server\n" ;
$OUT .= " ProxyPass /orders http://INTERNAL IP ADDRESS/\n" ;
$OUT .= " ProxyPassReverse /orders http://INTERNAL IP ADDRESS/\n" ;
$OUT .= "\n" ;
}
}
Save the file
(server-#) /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
-
Sorry pfloor!
I hadn't seen your response.
Thank you so much. Every "heavy" computer knows how much of a relief it is to solve a really frustrating problem. Thanks for helping.
-
Sorry pfloor!
I hadn't seen your response.
Thank you so much. Every "heavy" computer knows how much of a relief it is to solve a really frustrating problem. Thanks for helping.
No problem. Did you try the built-in db commands or did you stick with your custom template?
-
I'm gonna undo what I did and do it your way.
I trust your way is the proper way to do it.
-
Alright, that was sweet and easy. I really do appreciate your help. Such a relief!
-
Alright, that was sweet and easy. I really do appreciate your help. Such a relief!
And I added it to the wiki here:
http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass
-
pfloor
db domains setprop www."domain".com TemplatePath ProxyPassVirtualHosts ProxyPassTarget http://IP.Address.of.internal.server/path_if_needed/
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart[/code]
That didn't work for me, but this did, from one of your posts
http://forums.contribs.org/index.php?topic=38058.0
db domains set domain.to.proxy domain Nameservers internet
db domains setprop domain.to.proxy ProxyPassTarget http://x.x.x.12/
db domains setprop domain.to.proxy TemplatePath ProxyPassVirtualHosts
signal-event domain-create domain.to.proxy
-
pfloor
db domains setprop www."domain".com TemplatePath ProxyPassVirtualHosts ProxyPassTarget http://IP.Address.of.internal.server/path_if_needed/
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart[/code]
That didn't work for me, but this did, from one of your posts
http://forums.contribs.org/index.php?topic=38058.0
db domains set domain.to.proxy domain Nameservers internet
db domains setprop domain.to.proxy ProxyPassTarget http://x.x.x.12/
db domains setprop domain.to.proxy TemplatePath ProxyPassVirtualHosts
signal-event domain-create domain.to.proxy
There I go getting things mixed up in my head again. You are correct, I will fix the wiki, thanks Ray.
Interesting however, it appeared to work for the OP. It is probably because he already has the domain configured. I know this code is not complete and Charlie is looking at finishing it and adding ProxyPass to the domains panel. I will make sure he knows about this.
Thanks again Ray!
-Paul
-
paul
There I go getting things mixed up in my head again.
Interesting however, it appeared to work for the OP. It is probably because he already has the domain configured.
Hey you're doing great, as we all are. It's hard to keep up with Charlie & Gordon and all the rest of the team as so many 'good' changes are happening all the time.
I took a working "proxypass'd with contrib" domain offline, so I had to get it up again asap so didn't analyse "why not" at the time, but that's probably the reason.
I'll look at it again later when time permits and track the sequence of events.
I know this code is not complete and Charlie is looking at finishing it and adding ProxyPass to the domains panel. I will make sure he knows about this.
That will be good.
Interestingly I was able to edit the domain panel in 7.2 for the proxypass'd domain and add a description & select the primary ibay (I know it won't have any effect but it was to avoid confusion to other admins) and Save it without breaking the proxypass. It just added those db entries.