|  | @@ -52,12 +52,12 @@ matrix_variables=(ONION_ONLY
 | 
	
		
			
			| 52 | 52 |  
 | 
	
		
			
			| 53 | 53 |  function matrix_nginx {
 | 
	
		
			
			| 54 | 54 |      matrix_identityserver_proxy_str=' \
 | 
	
		
			
			| 55 |  | -    location /matrixid { \
 | 
	
		
			
			|  | 55 | +    location /_matrixid { \
 | 
	
		
			
			| 56 | 56 |          proxy_pass http://localhost:8081; \
 | 
	
		
			
			| 57 | 57 |          proxy_set_header X-Forwarded-For $remote_addr; \
 | 
	
		
			
			| 58 | 58 |      }'
 | 
	
		
			
			| 59 | 59 |      matrix_proxy_str=' \
 | 
	
		
			
			| 60 |  | -    location /matrix { \
 | 
	
		
			
			|  | 60 | +    location /_matrix { \
 | 
	
		
			
			| 61 | 61 |          proxy_pass https://localhost:8448; \
 | 
	
		
			
			| 62 | 62 |          proxy_set_header X-Forwarded-For $remote_addr; \
 | 
	
		
			
			| 63 | 63 |      }'
 | 
	
	
		
			
			|  | @@ -69,7 +69,7 @@ function matrix_nginx {
 | 
	
		
			
			| 69 | 69 |  
 | 
	
		
			
			| 70 | 70 |      if [[ $ONION_ONLY != 'no' ]]; then
 | 
	
		
			
			| 71 | 71 |          matrix_proxy_str=' \
 | 
	
		
			
			| 72 |  | -    location /matrix { \
 | 
	
		
			
			|  | 72 | +    location /_matrix { \
 | 
	
		
			
			| 73 | 73 |          proxy_pass http://localhost:8448; \
 | 
	
		
			
			| 74 | 74 |          proxy_set_header X-Forwarded-For $remote_addr; \
 | 
	
		
			
			| 75 | 75 |      }'
 | 
	
	
		
			
			|  | @@ -235,8 +235,9 @@ function matrix_configure_homeserver_yaml {
 | 
	
		
			
			| 235 | 235 |      sed -i "s|log_file:.*|log_file: \"/dev/null\"|g" "${filepath}"
 | 
	
		
			
			| 236 | 236 |      sed -i '0,/bind_address:.*/s//bind_address: 127.0.0.1/' "${filepath}"
 | 
	
		
			
			| 237 | 237 |      sed -i '0,/x_forwarded:.*/s//x_forwarded: true/' "${filepath}"
 | 
	
		
			
			| 238 |  | -    sed -i "s|server_name:.*|server_name: \"${DEFAULT_DOMAIN_NAME}/matrix\"|g" "${filepath}"
 | 
	
		
			
			| 239 |  | -    sed -i "/trusted_third_party_id_servers:/a     - ${DEFAULT_DOMAIN_NAME}/matrixid" "${filepath}"
 | 
	
		
			
			|  | 238 | +    sed -i "s|server_name:.*|server_name: \"${DEFAULT_DOMAIN_NAME}/_matrix\"|g" "${filepath}"
 | 
	
		
			
			|  | 239 | +    sed -i "/trusted_third_party_id_servers:/a     - ${DEFAULT_DOMAIN_NAME}/_matrixid" "${filepath}"
 | 
	
		
			
			|  | 240 | +    sed -i "s|- ${DEFAULT_DOMAIN_NAME}/_matrixid|    - ${DEFAULT_DOMAIN_NAME}/_matrixid|g" "${filepath}"
 | 
	
		
			
			| 240 | 241 |  }
 | 
	
		
			
			| 241 | 242 |  
 | 
	
		
			
			| 242 | 243 |  function matrix_configure_identityserver {
 | 
	
	
		
			
			|  | @@ -247,7 +248,7 @@ function matrix_configure_identityserver {
 | 
	
		
			
			| 247 | 248 |      sed -i "s|Sydent Validation|Freedombone Matrix Account Validation|g" ${filepath}
 | 
	
		
			
			| 248 | 249 |      sed -i "s|pidfile.path.*|pidfile.path = /etc/sydent/sydent.pid|g" ${filepath}
 | 
	
		
			
			| 249 | 250 |      sed -i "s|log.path.*|log.path = /dev/null|g" ${filepath}
 | 
	
		
			
			| 250 |  | -    sed -i "s|server.name.*|server.name = ${DEFAULT_DOMAIN_NAME}/matrixid|g" ${filepath}
 | 
	
		
			
			|  | 251 | +    sed -i "s|server.name.*|server.name = ${DEFAULT_DOMAIN_NAME}/_matrixid|g" ${filepath}
 | 
	
		
			
			| 251 | 252 |  }
 | 
	
		
			
			| 252 | 253 |  
 | 
	
		
			
			| 253 | 254 |  function matrix_diff {
 | 
	
	
		
			
			|  | @@ -445,9 +446,9 @@ function remove_matrix {
 | 
	
		
			
			| 445 | 446 |      delgroup matrix
 | 
	
		
			
			| 446 | 447 |      remove_onion_service matrix ${MATRIX_PORT}
 | 
	
		
			
			| 447 | 448 |  
 | 
	
		
			
			| 448 |  | -    sed -i "/location \/matrix {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
 | 
	
		
			
			| 449 |  | -    sed -i "/location \/matrixid {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
 | 
	
		
			
			| 450 |  | -    sed -i "/location \/turn {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
 | 
	
		
			
			|  | 449 | +    sed -i "/location \/_matrix {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
 | 
	
		
			
			|  | 450 | +    sed -i "/location \/_matrixid {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
 | 
	
		
			
			|  | 451 | +    sed -i "/location \/_turn {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
 | 
	
		
			
			| 451 | 452 |      systemctl restart nginx
 | 
	
		
			
			| 452 | 453 |  
 | 
	
		
			
			| 453 | 454 |      remove_completion_param install_matrix
 |