| 49 #include "event.h" |
49 #include "event.h" |
| 50 #include "threadpools.h" |
50 #include "threadpools.h" |
| 51 #include "ldap_auth.h" |
51 #include "ldap_auth.h" |
| 52 #include "configmanager.h" |
52 #include "configmanager.h" |
| 53 #include "resourcepool.h" |
53 #include "resourcepool.h" |
| |
54 #include "location.h" |
| 54 |
55 |
| 55 #include "vserver.h" |
56 #include "vserver.h" |
| 56 #include "../util/pblock.h" |
57 #include "../util/pblock.h" |
| 57 #include "../util/util.h" |
58 #include "../util/util.h" |
| 58 #include "../util/atomic.h" |
59 #include "../util/atomic.h" |
| 744 if(!acldata) { |
745 if(!acldata) { |
| 745 return -1; |
746 return -1; |
| 746 } |
747 } |
| 747 vs->acls = acldata; |
748 vs->acls = acldata; |
| 748 |
749 |
| |
750 CxList *locations = serverconfig_get_node_list(obj, CONFIG_NODE_OBJECT, CX_STR("Location")); |
| |
751 CxIterator i = cxListIterator(locations); |
| |
752 cx_foreach(ConfigNode *, node, i) { |
| |
753 WSLocation *location = cfg_location_get(cfg->a, node); |
| |
754 if(location) { |
| |
755 vs_add_location(vs, location); |
| |
756 } else { |
| |
757 log_ereport(LOG_FAILURE, "VirtualServer %s error: abort", vs->name.ptr); |
| |
758 return 1; |
| |
759 } |
| |
760 } |
| |
761 cxListFree(locations); |
| 749 |
762 |
| 750 // set the access log for the virtual server |
763 // set the access log for the virtual server |
| 751 // TODO: don't always use the default |
764 // TODO: don't always use the default |
| 752 vs->log = cfg->default_log; |
765 vs->log = cfg->default_log; |
| 753 |
766 |