better
git-svn-id: file:///raid/svn-personal/tewi/trunk@13 8739d7e6-ffea-ec47-b151-bdff447c6205
This commit is contained in:
parent
448281ee99
commit
3aee1dbd4b
|
@ -16,7 +16,7 @@ struct tw_config config;
|
|||
struct tw_config_entry* tw_vhost_match(const char* name, int port) {
|
||||
int i;
|
||||
for(i = 0; i < config.vhost_count; i++) {
|
||||
if(strcmp(config.vhosts[i].name, name) == 0 && config.vhosts[i].port == port) {
|
||||
if(strcmp(config.vhosts[i].name, name) == 0 && (config.vhosts[i].port == -1 ? 1 : config.vhosts[i].port == port)) {
|
||||
return &config.vhosts[i];
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ int tw_config_read(const char* path) {
|
|||
current = &config.vhosts[config.vhost_count++];
|
||||
int i;
|
||||
current->name = cm_strdup(vhost);
|
||||
current->port = 80;
|
||||
current->port = -1;
|
||||
for(i = 0; vhost[i] != 0; i++) {
|
||||
if(vhost[i] == ':') {
|
||||
current->name[i] = 0;
|
||||
|
|
|
@ -127,6 +127,8 @@ unsigned int WINAPI tw_server_pass(void* ptr) {
|
|||
#else
|
||||
void tw_server_pass(int sock, bool ssl, int port) {
|
||||
#endif
|
||||
char* name = config.hostname;
|
||||
|
||||
SSL_CTX* ctx = NULL;
|
||||
SSL* s = NULL;
|
||||
if(ssl) {
|
||||
|
|
|
@ -7,5 +7,5 @@ ListenSSL 8443 8444 8445 8446 8447
|
|||
SSLKey key.pem
|
||||
SSLCertificate cert.pem
|
||||
|
||||
BeginVirtualHost nishinbsd-ssd:8443
|
||||
BeginVirtualHost nishinbsd-ssd
|
||||
EndVirtualHost
|
||||
|
|
Loading…
Reference in New Issue
Block a user