diff --git a/src/nginxconfig/templates/app.vue b/src/nginxconfig/templates/app.vue
index 6ee0349..1b75a8d 100644
--- a/src/nginxconfig/templates/app.vue
+++ b/src/nginxconfig/templates/app.vue
@@ -70,8 +70,8 @@ limitations under the License.
{{ i18n.templates.app.configFiles }}
- d && d.server.domain.computed === data.server.domain.computed)) {
+ count++;
+ data.server.domain.computed = data.server.domain.default.replace('.com', `${count}.com`);
+ }
+ data.server.domain.value = data.server.domain.computed;
+
+ // Store
+ this.$data.domains.push(data);
this.$data.active = this.$data.domains.length - 1;
},
remove(index) {
diff --git a/src/nginxconfig/templates/domain_sections/server.vue b/src/nginxconfig/templates/domain_sections/server.vue
index c6e7d12..a7789fe 100644
--- a/src/nginxconfig/templates/domain_sections/server.vue
+++ b/src/nginxconfig/templates/domain_sections/server.vue
@@ -182,15 +182,14 @@ limitations under the License.
i18n,
};
},
- computed: computedFromDefaults(defaults, 'server'), // Getters & setters for the delegated data
+ computed: computedFromDefaults(defaults, 'server'), // Getters & setters for the delegated data
watch: {
'$props.data.domain': {
handler(data) {
- // This might cause recursion, but seems not to
-
- // Ignore www. if given
+ // Ignore www. if given, enable WWW subdomain
if (data.computed.startsWith('www.')) {
data.computed = data.computed.slice(4);
+ this.wwwSubdomain = true;
}
// Use default if empty