diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/RegionApplicationBase.cs | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs index 603f139..77b0138 100644 --- a/OpenSim/Region/Application/RegionApplicationBase.cs +++ b/OpenSim/Region/Application/RegionApplicationBase.cs | |||
@@ -69,23 +69,38 @@ namespace OpenSim | |||
69 | 69 | ||
70 | Initialize(); | 70 | Initialize(); |
71 | 71 | ||
72 | m_httpServer | 72 | uint mainport = m_networkServersInfo.HttpListenerPort; |
73 | = new BaseHttpServer( | 73 | uint mainSSLport =m_networkServersInfo.httpSSLPort; |
74 | m_httpServerPort, m_networkServersInfo.HttpUsesSSL, | ||
75 | m_networkServersInfo.httpSSLPort, m_networkServersInfo.HttpSSLCN, | ||
76 | m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass); | ||
77 | 74 | ||
78 | /* why this? we only run one | 75 | if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport)) |
79 | if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) | ||
80 | { | 76 | { |
81 | 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"); |
82 | } | 78 | } |
83 | */ | ||
84 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP{0} server on port {1}", | ||
85 | m_networkServersInfo.HttpUsesSSL ? "S" : "", m_httpServerPort); | ||
86 | m_httpServer.Start(); | ||
87 | 79 | ||
88 | MainServer.AddHttpServer(m_httpServer); | 80 | if(m_networkServersInfo.HttpUsesSSL) |
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; | ||
103 | |||
89 | MainServer.Instance = m_httpServer; | 104 | MainServer.Instance = m_httpServer; |
90 | 105 | ||
91 | // "OOB" Server | 106 | // "OOB" Server |
@@ -93,22 +108,22 @@ namespace OpenSim | |||
93 | { | 108 | { |
94 | if (!m_networkServersInfo.ssl_external) | 109 | if (!m_networkServersInfo.ssl_external) |
95 | { | 110 | { |
96 | BaseHttpServer server = new BaseHttpServer( | 111 | server = new BaseHttpServer( |
97 | 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, | ||
98 | m_networkServersInfo.cert_pass); | 114 | m_networkServersInfo.cert_pass); |
99 | 115 | ||
100 | 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); | ||
101 | MainServer.AddHttpServer(server); | 118 | MainServer.AddHttpServer(server); |
102 | server.Start(); | ||
103 | } | 119 | } |
104 | else | 120 | else |
105 | { | 121 | { |
106 | BaseHttpServer server = new BaseHttpServer( | 122 | server = new BaseHttpServer(m_networkServersInfo.https_port); |
107 | m_networkServersInfo.https_port); | ||
108 | 123 | ||
109 | 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); | ||
110 | MainServer.AddHttpServer(server); | 126 | MainServer.AddHttpServer(server); |
111 | server.Start(); | ||
112 | } | 127 | } |
113 | } | 128 | } |
114 | 129 | ||