@@ -144,6 +144,10 @@ def info(self):
144144 ee_db_host = siteinfo .db_host
145145 if sitetype != "html" :
146146 hhvm = ("enabled" if siteinfo .is_hhvm else "disabled" )
147+ if sitetype == "proxy" :
148+ access_log = "/var/log/nginx/{0}.access.log" .format (ee_domain )
149+ error_log = "/var/log/nginx/{0}.error.log" .format (ee_domain )
150+ ee_site_webroot = ''
147151
148152 pagespeed = ("enabled" if siteinfo .is_pagespeed else "disabled" )
149153
@@ -730,14 +734,21 @@ def doupdatesite(self, pargs):
730734 Log .info (self , "Password Unchanged." )
731735 return 0
732736
737+ if ((stype == "proxy" and stype == oldsitetype and self .app .pargs .hhvm )
738+ or (stype == "proxy" and
739+ stype == oldsitetype and self .app .pargs .pagespeed )):
740+ Log .info (self , Log .FAIL +
741+ "Can not update proxy site to HHVM or Pagespeed" )
742+ return 1
733743 if stype == "html" and stype == oldsitetype and self .app .pargs .hhvm :
734744 Log .info (self , Log .FAIL + "Can not update HTML site to HHVM" )
735745 return 1
736746
737- if ((stype == 'php' and oldsitetype != 'html' ) or
738- (stype == 'mysql' and oldsitetype not in ['html' , 'php' ]) or
747+ if ((stype == 'php' and oldsitetype not in ['html' , 'proxy' ]) or
748+ (stype == 'mysql' and oldsitetype not in ['html' , 'php' ,
749+ 'proxy' ]) or
739750 (stype == 'wp' and oldsitetype not in ['html' , 'php' , 'mysql' ,
740- 'wp' ]) or
751+ 'proxy' , ' wp' ]) or
741752 (stype == 'wpsubdir' and oldsitetype in ['wpsubdomain' ]) or
742753 (stype == 'wpsubdomain' and oldsitetype in ['wpsubdir' ]) or
743754 (stype == oldsitetype and cache == oldcachetype ) and
@@ -781,8 +792,7 @@ def doupdatesite(self, pargs):
781792
782793 stype = oldsitetype
783794 cache = oldcachetype
784-
785- if oldsitetype == 'html' :
795+ if oldsitetype == 'html' or oldsitetype == 'proxy' :
786796 data ['static' ] = True
787797 data ['wp' ] = False
788798 data ['multisite' ] = False
@@ -962,7 +972,7 @@ def doupdatesite(self, pargs):
962972 return 1
963973
964974 # Setup WordPress if old sites are html/php/mysql sites
965- if data ['wp' ] and oldsitetype in ['html' , 'php' , 'mysql' ]:
975+ if data ['wp' ] and oldsitetype in ['html' , 'proxy' , ' php' , 'mysql' ]:
966976 try :
967977 ee_wp_creds = setupwordpress (self , data )
968978 except SiteError as e :
0 commit comments