Changes

From SME Server
Jump to navigationJump to search
New section added for ProxyPass a alias/directory/location
Line 351: Line 351:     
====ProxyPass a domain====
 
====ProxyPass a domain====
 +
 +
This section covers ProxyPass directives in the "domains" database
    
*I want to pass some http requests to a server behind my SME Server or external to my site, how can I do this?
 
*I want to pass some http requests to a server behind my SME Server or external to my site, how can I do this?
Line 376: Line 378:     
http://forums.contribs.org/index.php?topic=46975.0
 
http://forums.contribs.org/index.php?topic=46975.0
 +
 +
====ProxyPass a alias/directory/location====
 +
 +
This section covers the db settings in the "accounts" database that generate ProxyPass directives in httpd.conf
 +
 +
*I have a domain http://mydomain.com and I would like http://mydomain.com/extra to forward to the internal server. How do I do this using the db account directives ?
 +
 +
You can do what you want by creating a custom template fragment that enables proxypass on ".../extra"; the notes from this forum discussion http://forums.contribs.org/index.php/topic,40075.0.html should help.
 +
 +
The following works on SME 7.5.1 and SME 8beta6 systems where the template fragment /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35ProxyPass contains the appropriate code which is automatically generated by issuing the following db commands:
 +
 +
db accounts set extra ProxyPass
 +
db accounts setprop extra Target http://192.168.1.35
 +
db accounts setprop extra Description InternalServer
 +
db accounts setprop extra HTTP on
 +
db accounts setprop extra HTTPS on
 +
db accounts setprop extra ValidFrom 80.90.100.0/24,74.125.93.105
 +
expand-template /etc/httpd/conf/httpd.conf
 +
sv t httpd-e-smith
 +
 +
Note: In the above commands set xxxx ProxyPass, setprop xxxx Target http://<target> and setprop xxxx Description <description> are required; all other lines are optional
 +
 +
Note: It doesn't look like these directives are going to work for HTTPS connections by default (they end up inside a "Listen 0.0.0.0:80" section in httpd.conf). It appears that 35ProxyPass is old (mentioned in a bug from year 2006), while ProxyPass SSL support was fixed in a later bug (in year 2007), by which time the ProxyPass code had been moved to the virtual domains templates.
 +
 +
Note: HTTP and HTTPS are set to yes by default, so there is no need to set it. Apart from that it is preferred to use no when you want it to be disabled, over on/off or enabled/disabled.
 +
 +
Refer to these forum posts:
 +
 +
http://forums.contribs.org/index.php/topic,47741.msg236017.html#msg236017
 +
 +
http://forums.contribs.org/index.php/topic,40075.0.html
    
===Shell Access===
 
===Shell Access===
624

edits

Navigation menu