proxy_http_port und proxy_websocket_port zurückgebaut

This commit is contained in:
Timotheus Pokorra 2023-12-11 17:21:10 +01:00
parent 237c6d49fb
commit 864c21be13
6 changed files with 1 additions and 65 deletions

View File

@ -93,5 +93,3 @@ ALTER TABLE domain ADD COLUMN passenger_python character varying(255);
ALTER TABLE domain ADD COLUMN passenger_nodejs character varying(255); ALTER TABLE domain ADD COLUMN passenger_nodejs character varying(255);
ALTER TABLE domain ADD COLUMN passenger_ruby character varying(255); ALTER TABLE domain ADD COLUMN passenger_ruby character varying(255);
ALTER TABLE domain ADD COLUMN fcgi_php_bin character varying(255); ALTER TABLE domain ADD COLUMN fcgi_php_bin character varying(255);
ALTER TABLE domain ADD COLUMN proxy_http_port integer;
ALTER TABLE domain ADD COLUMN proxy_websocket_port integer;

View File

@ -323,9 +323,7 @@ CREATE TABLE domain (
passenger_python character varying(256) NULL, passenger_python character varying(256) NULL,
passenger_nodejs character varying(256) NULL, passenger_nodejs character varying(256) NULL,
passenger_ruby character varying(256) NULL, passenger_ruby character varying(256) NULL,
fcgi_php_bin character varying(256) NULL, fcgi_php_bin character varying(256) NULL
proxy_http_port integer DEFAULT NULL,
proxy_websocket_port integer DEFAULT NULL
); );

View File

@ -59,10 +59,6 @@ public class DomainRemote extends AbstractRemote {
resultMap.put("passengerruby", passengerruby); resultMap.put("passengerruby", passengerruby);
final String passengerfcgiphpbin = dom.getPassengerFcgiPhpBin(); final String passengerfcgiphpbin = dom.getPassengerFcgiPhpBin();
resultMap.put("passengerfcgiphpbin", passengerfcgiphpbin); resultMap.put("passengerfcgiphpbin", passengerfcgiphpbin);
final String proxyhttpport = dom.getProxyHttpPort();
resultMap.put("proxyhttpport", proxyhttpport);
final String proxywebsocketport = dom.getProxyWebsocketPort();
resultMap.put("proxywebsocketport", proxywebsocketport);
} }
@Override @Override
@ -120,14 +116,6 @@ public class DomainRemote extends AbstractRemote {
if (fcgiphpbin != null && fcgiphpbin instanceof String) { if (fcgiphpbin != null && fcgiphpbin instanceof String) {
dom.setFcgiPhpBin((String) fcgiphpbin); dom.setFcgiPhpBin((String) fcgiphpbin);
} }
final Object proxyhttpport = setParams.get("proxyhttpport");
if (proxyhttpport != null && proxyhttpport instanceof Integer) {
dom.setProxyHttpPort((Integer)proxyhttpport);
}
final Object proxywebsocketport = setParams.get("proxywebsocketport");
if (proxywebsocketport != null && proxywebsocketport instanceof Integer) {
dom.setProxyWebsocketPort((Integer)proxywebsocketport);
}
} }
@Override @Override

View File

@ -125,8 +125,6 @@ public class JsonPillarServlet extends HttpServlet {
final String passengerNodejs = dom.getPassengerNodejs(); final String passengerNodejs = dom.getPassengerNodejs();
final String passengerRuby = dom.getPassengerRuby(); final String passengerRuby = dom.getPassengerRuby();
final String fcgiPhpBin = dom.getFcgiPhpBin(); final String fcgiPhpBin = dom.getFcgiPhpBin();
final Integer proxyHttpPort = dom.getProxyHttpPort();
final Integer proxyWebsocketPort = dom.getProxyWebsocketPort();
final INetAddress domINetAddr = domPac.getCurINetAddr(); final INetAddress domINetAddr = domPac.getCurINetAddr();
writer.println(" \"domain\": \"" + domName + "\""); writer.println(" \"domain\": \"" + domName + "\"");
writer.println(" , \"pac\": \"" + domPac.getName() + "\""); writer.println(" , \"pac\": \"" + domPac.getName() + "\"");
@ -166,12 +164,6 @@ public class JsonPillarServlet extends HttpServlet {
if (fcgPhpBin.length() > 0) { if (fcgPhpBin.length() > 0) {
writer.println(" , \"fcgiphpbin\": \"" + fcgPhpBin + "\""); writer.println(" , \"fcgiphpbin\": \"" + fcgPhpBin + "\"");
} }
if (proxyHttpPort > 0) {
writer.println(" , \"proxyhttpport\": \"" + proxyHttpPort.toString() + "\"");
}
if (proxyWebsocketPort > 0) {
writer.println(" , \"proxywebsocketport\": \"" + proxyWebsocketPort.toString() + "\"");
}
writer.println(" }"); writer.println(" }");
} }
writer.println(" ]"); writer.println(" ]");

View File

@ -181,22 +181,6 @@
#end #end
#if( ${proxywebsocketport} )
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP:Connection} Upgrade [NC,OR]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule .* ws://127.0.0.1:${proxywebsocketport}/%{REQUEST_URI} [proxy]
#end
#if( ${proxyhttpport} )
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:${proxyhttpport}/%{REQUEST_URI} [proxy,last]
RequestHeader set X-Forwarded-Proto "https"
#end
#if( ${fcgiphpbin} ) #if( ${fcgiphpbin} )
SetEnv HTTP_PHP_BIN ${fcgiphpbin} SetEnv HTTP_PHP_BIN ${fcgiphpbin}
#end #end

View File

@ -82,14 +82,6 @@ public class Domain extends AbstractEntity {
@Column(name = "fcgi_php_bin", columnDefinition = "character varying(256)") @Column(name = "fcgi_php_bin", columnDefinition = "character varying(256)")
private String fcgiphpbin; private String fcgiphpbin;
@AnnFieldIO(validation="[0-9]*", rw=ReadWriteAccess.READWRITE)
@Column(name = "proxy_http_port", columnDefinition = "integer")
private Integer proxyhttpport;
@AnnFieldIO(validation="[0-9]*", rw=ReadWriteAccess.READWRITE)
@Column(name = "proxy_websocket_port", columnDefinition = "integer")
private Integer proxywebsocketport;
public Domain() { public Domain() {
} }
@ -247,22 +239,6 @@ public class Domain extends AbstractEntity {
fcgiphpbin = value; fcgiphpbin = value;
} }
public Integer getProxyHttpPort() {
return proxyhttpport;
}
public void setProxyHttpPort(String value) {
proxyhttpport = value;
}
public Integer getProxyWebsocketPort() {
return proxywebsocketport;
}
public void setProxyWebsocketPort(String value) {
proxywebsocketport = value;
}
public String getServeraliases() { public String getServeraliases() {
String[] subs = validsubdomainnames.split(","); String[] subs = validsubdomainnames.split(",");
StringBuffer aliases = new StringBuffer(); StringBuffer aliases = new StringBuffer();