aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/RegionApplicationBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/RegionApplicationBase.cs')
-rw-r--r--OpenSim/Region/Application/RegionApplicationBase.cs51
1 files changed, 35 insertions, 16 deletions
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs
index ba92fd6..77b0138 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,38 @@ 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
74 m_networkServersInfo.HttpSSLCN); 75 if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport))
75
76 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
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 mainSSLport, m_networkServersInfo.HttpSSLCN,
85 m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass);
86 m_httpServer.Start(true,true);
87 MainServer.AddHttpServer(m_httpServer);
88
89 }
90
91 // unsecure main server
92 BaseHttpServer server = new BaseHttpServer(mainport);
93 if(!m_networkServersInfo.HttpUsesSSL)
94 {
95 m_httpServer = server;
96 server.Start(true, true);
97 }
98 else
99 server.Start(false, false);
100
101 MainServer.AddHttpServer(server);
102 MainServer.ÚnSecureInstance = server;
83 103
84 MainServer.AddHttpServer(m_httpServer);
85 MainServer.Instance = m_httpServer; 104 MainServer.Instance = m_httpServer;
86 105
87 // "OOB" Server 106 // "OOB" Server
@@ -89,22 +108,22 @@ namespace OpenSim
89 { 108 {
90 if (!m_networkServersInfo.ssl_external) 109 if (!m_networkServersInfo.ssl_external)
91 { 110 {
92 BaseHttpServer server = new BaseHttpServer( 111 server = new BaseHttpServer(
93 m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, 112 m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener,
113 m_networkServersInfo.cert_path,
94 m_networkServersInfo.cert_pass); 114 m_networkServersInfo.cert_pass);
95 115
96 m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); 116 m_log.InfoFormat("[REGION SERVER]: Starting OOB HTTPS server on port {0}", server.SSLPort);
117 server.Start(false, false);
97 MainServer.AddHttpServer(server); 118 MainServer.AddHttpServer(server);
98 server.Start();
99 } 119 }
100 else 120 else
101 { 121 {
102 BaseHttpServer server = new BaseHttpServer( 122 server = new BaseHttpServer(m_networkServersInfo.https_port);
103 m_networkServersInfo.https_port);
104 123
105 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); 124 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port);
125 server.Start(false, false);
106 MainServer.AddHttpServer(server); 126 MainServer.AddHttpServer(server);
107 server.Start();
108 } 127 }
109 } 128 }
110 129