aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/RegionApplicationBase.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/RegionApplicationBase.cs48
1 files changed, 33 insertions, 15 deletions
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs
index 83a9fff..0112c1e 100644
--- a/OpenSim/Region/Application/RegionApplicationBase.cs
+++ b/OpenSim/Region/Application/RegionApplicationBase.cs
@@ -50,6 +50,7 @@ namespace OpenSim
50 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); 50 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>();
51 protected NetworkServersInfo m_networkServersInfo; 51 protected NetworkServersInfo m_networkServersInfo;
52 protected uint m_httpServerPort; 52 protected uint m_httpServerPort;
53 protected bool m_httpServerSSL;
53 protected ISimulationDataService m_simulationDataService; 54 protected ISimulationDataService m_simulationDataService;
54 protected IEstateDataService m_estateDataService; 55 protected IEstateDataService m_estateDataService;
55 56
@@ -68,20 +69,37 @@ namespace OpenSim
68 69
69 Initialize(); 70 Initialize();
70 71
71 m_httpServer 72 uint mainport = m_networkServersInfo.HttpListenerPort;
72 = new BaseHttpServer( 73 uint mainSSLport = m_networkServersInfo.httpSSLPort;
73 m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
74 m_networkServersInfo.HttpSSLCN);
75 74
76 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) 75 if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport))
77 { 76 {
78 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); 77 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
79 } 78 }
80 79
81 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort); 80 if(m_networkServersInfo.HttpUsesSSL)
82 m_httpServer.Start(); 81 {
82 m_httpServer = new BaseHttpServer(
83 mainSSLport, m_networkServersInfo.HttpUsesSSL,
84 m_networkServersInfo.HttpSSLCN,
85 m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass);
86 m_httpServer.Start(true,true);
87 MainServer.AddHttpServer(m_httpServer);
88 }
89
90 // unsecure main server
91 BaseHttpServer server = new BaseHttpServer(mainport);
92 if(!m_networkServersInfo.HttpUsesSSL)
93 {
94 m_httpServer = server;
95 server.Start(true, true);
96 }
97 else
98 server.Start(false, false);
99
100 MainServer.AddHttpServer(server);
101 MainServer.UnSecureInstance = server;
83 102
84 MainServer.AddHttpServer(m_httpServer);
85 MainServer.Instance = m_httpServer; 103 MainServer.Instance = m_httpServer;
86 104
87 // "OOB" Server 105 // "OOB" Server
@@ -89,22 +107,22 @@ namespace OpenSim
89 { 107 {
90 if (!m_networkServersInfo.ssl_external) 108 if (!m_networkServersInfo.ssl_external)
91 { 109 {
92 BaseHttpServer server = new BaseHttpServer( 110 server = new BaseHttpServer(
93 m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, 111 m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener,
112 m_networkServersInfo.cert_path,
94 m_networkServersInfo.cert_pass); 113 m_networkServersInfo.cert_pass);
95 114
96 m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); 115 m_log.InfoFormat("[REGION SERVER]: Starting OOB HTTPS server on port {0}", server.SSLPort);
116 server.Start(false, false);
97 MainServer.AddHttpServer(server); 117 MainServer.AddHttpServer(server);
98 server.Start();
99 } 118 }
100 else 119 else
101 { 120 {
102 BaseHttpServer server = new BaseHttpServer( 121 server = new BaseHttpServer(m_networkServersInfo.https_port);
103 m_networkServersInfo.https_port);
104 122
105 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); 123 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port);
124 server.Start(false, false);
106 MainServer.AddHttpServer(server); 125 MainServer.AddHttpServer(server);
107 server.Start();
108 } 126 }
109 } 127 }
110 128