diff --git a/Makefile b/Makefile
index fc5f5188d5fd5bb0d82c4cc13b238e2ee1ed7f20..f0955ace57478c70a3f4ba341482ac4ffbc9f473 100644
--- a/Makefile
+++ b/Makefile
@@ -61,29 +61,46 @@ shell:
 
 # params:
 #- target - proxy destanation adress. Also you can specify container name in memes_network;
-#- subdomain - new subdomain name.
-## Generate new subdomain configuration in nginx sites-available. with subdomain pointing to target. | parameters: target, subdomain
+#- addr - new address mapping in format ${subdomain}.${domain}.
+#- zone - new address zone. Default: 'com'.
+## Generate new subdomain configuration in nginx sites-available. with subdomain pointing to target. | parameters: target, subdomain, zone
 add:
-ifndef subdomain
-	@echo "${RED}Error${RESET}: please specify ${YELLOW}subdomain${RESET} variable"
+ifndef addr
+	@echo "${RED}Error${RESET}: please specify ${YELLOW}addr${RESET} variable."
 	exit 1
 endif
 ifndef target
 	@echo "${RED}Error${RESET}: please specify ${YELLOW}target${RESET} variable"
 	exit 1
 endif
-	cp ./nginx/subdomain_template.conf ./nginx/sites-enabled/$(subdomain).$(domain_name).conf
-	sed -i 's/$${sub_domain}/${subdomain}/g;'\
-	's/\$${main_domain}/${domain_name}/g;'\
-	's/\$${domain_zone}/${domain_zone}/g;'\
-	's/$${target_cont}/${target}/' ./nginx/sites-enabled/$(subdomain).$(domain_name).conf
-	@docker exec -it ${cont_name} nginx -s reload; if [ $$? -ne 0 ]; then\
+ifndef zone
+	$(eval zone="com")
+endif
+	set -e ;\
+	SUBDOMAIN_VAR=$$(echo "${addr}" | cut -d '.' -f1) ;\
+	DOMAIN_VAR=$$(echo "${addr}" | cut -d '.' -f2);\
+	cp ./nginx/subdomain_template.conf "./nginx/sites-enabled/$${SUBDOMAIN_VAR}.$${DOMAIN_VAR}.conf";\
+	sed -i "s/\$${sub_domain}/$${SUBDOMAIN_VAR}/g;"\
+	"s/\$${main_domain}/$${DOMAIN_VAR}/g;"\
+	"s/\$${domain_zone}/${zone}/g;"\
+	"s/\$${target_cont}/${target}/" "./nginx/sites-enabled/$${SUBDOMAIN_VAR}.$${DOMAIN_VAR}.conf"; \
+	docker exec -it ${cont_name} nginx -s reload; if [ $$? -ne 0 ]; then\
 		echo -e '${RED}Wrong config.${RESET}\n'\
 		'Please make sure that ${YELLOW}target${RESET} and ${YELLOW}subdomain${RESET} parameters was provided and correct.' ;\
-		rm ./nginx/sites-enabled/$(subdomain).$(domain_name).conf ;\
+		rm ./nginx/sites-enabled/$${SUBDOMAIN_VAR}.$${DOMAIN_VAR}.conf ;\
 		docker exec -it ${cont_name} nginx -s reload;\
 	fi
 
+
+tesa:
+ifndef addr
+	$(eval addr="hui.sosi")
+endif
+	set -e ;\
+	TMP=$$(echo "${addr}" | cut -d '.' -f1) ;\
+	TMP2=$$(echo "${addr}" | cut -d '.' -f2);\
+	echo "$${TMP}____$${TMP2}";
+
 _create_trash:
 	mkdir -p ./trash
 
diff --git a/nginx/common/server.conf b/nginx/common/server.conf
index 091325ff78446fc1be1bc8654dd48a681aaa912c..70f84ab376db928bdf9959419f3192beba312933 100644
--- a/nginx/common/server.conf
+++ b/nginx/common/server.conf
@@ -1,6 +1,3 @@
-ssl_certificate /var/nginx/ssl/le-memese_certificate.pem;
-ssl_certificate_key /var/nginx/ssl/le-memese_private.key;
-
 charset utf-8;
 
 gzip on;
@@ -19,7 +16,6 @@ text/javascript
 application/json
 application/xml+rss;
 
-client_max_body_size            100m;
 client_body_buffer_size         128k;
 client_header_buffer_size       5120k;
 large_client_header_buffers 16  5120k;
diff --git a/nginx/subdomain_template.conf b/nginx/subdomain_template.conf
index 5a40b9a0d4b81270e00b2b74f591aa2e6f813d81..a88b0f3ed58e172fd1f75360ba6b11a441216375 100644
--- a/nginx/subdomain_template.conf
+++ b/nginx/subdomain_template.conf
@@ -1,8 +1,12 @@
 server{
   listen 443 ssl;
   server_name ${sub_domain}.${main_domain}.${domain_zone};
+
+  ssl_certificate /var/nginx/ssl/${main_domain}_certificate.pem;
+  ssl_certificate_key /var/nginx/ssl/${main_domain}_private.key;
   
   include /var/nginx/common/server.conf;
+  client_max_body_size            100m;
 
   access_log  /var/log/nginx/${sub_domain}.${main_domain}.${domain_zone}_access.log combined;
   error_log   /var/log/nginx/${sub_domain}.${main_domain}.${domain_zone}_error.log;