Subdomain for Confluence
Asked by Yashin Vladislav:

I want to use the address <http://confluence.mycompany.com> instead default http://localhost:8090.

I do:

1. Choose the**cog icon** ![](https://confluence.atlassian.com/doc/files/148592/704578493/1/1422395012836/Cog.png), then choose **General Configuration** under Confluence Administration
2. Choose **General Configuration** in the left-hand panel
3. Choose **Edit**
4. Enter the <http://confluence.mycompany.com> in the **Server Base URL** text box
5. Choose **Save**

And after restart if I go to [http://localhost:8090](http://localhost:8090/), i get :
> **Your URL doesn't match**   
>
> Confluence's base URL is set to [http://confluence.mycompany.](http://confluence.soglasie.ru/)com but you are accessing Confluence from [http://localhost:8090](http://localhost:8090/).  
>
> Update base URL

If i go to [http://confluence.mycompany.](http://confluence.soglasie.ru/)com, i get:

**Explanation:** The Web server refused the connection.

**Try the following:**

* **Refresh page:** Search for the page again by clicking the Refresh button. The timeout could have occurred due to Internet congestion.
* **Check spelling:** Check that the Web page address is spelled correctly. The address may have been mistyped.
* **Access from a link:** If there is a link to the page you are looking for, try accessing the page from that link.
* **Contact website:** You may want to contact the website administrator to make sure the Web page still exists. You can do this by using the e-mail address or phone number listed on the website home page.

If you are still not able to view the requested page, try contacting your administrator or Helpdesk.

**Technical Information (for support personnel)**

* Error Code 10061: Connection refused
* Background: The server you are attempting to access has refused the connection with the gateway. This usually results from trying to connect to a service that is inactive on the server.
* Date: 11/2/2017 10:47:21 AM \[GMT\]
* Server: tmg-node1.mycompany.ru

what is the problem?

* Source: Remote server

How can i do this?


Answers:
author: Nic Brough -Adaptavist-
body: Your network is not routing the request <http://confluence.mycompany.com> to Confluence.

This could be DNS, routing, (I would mention firewalls, but the error is not a block, it's a "not serving", so we know the request is landing somewhere), or that the server you are contacting is not serving pages where you have ended up.

Easiest test is to specify the right port - try <http://confluence.mycompany.com:8090> - what does that say?

comments: author: Yashin Vladislav
body: If I try to enter [http://confluence.mycompany.com:8090](http://confluence.mycompany.com:8090/) I can log in and receive a notification:
> **Your URL doesn't match**
>
> Confluence's base URL is set to [http://confluence.soglasie.ru](http://confluence.soglasie.ru/) but you are accessing Confluence from [http://confluence.soglasie.ru:8090](http://confluence.soglasie.ru:8090/).
>
> Update base URL

Tell me please what it means?


author: Nic Brough -Adaptavist-
body: That's good. It means your network is routing correctly, and the server is running Confluence as expected.

I assume you really want to change the port number of 8090 so you don't have to have it in the url. To do that, you need to make the server listen on port 80. Almost all software (i.e. browsers) assume that if you don't specify a port in a url, then they should use the default one invisibly. That's port 80 for http.

So, you need to relocate it from 8090 to 80. You can do that in the Tomcat running Confluence, or you can run Confluence through a proxy. Most people use proxies because they have other advantages like caching, easier setup and security, and being able to make many services work together to look like one, but you might not need any of that.

Are you going to want to do this with Tomcat, or a proxy?


author: Yashin Vladislav
body: I think the proxy is more true option.


author: Nic Brough -Adaptavist-
body: It's certainly easier on the most part.

Next question is which proxy. Most people I work with use Apache, and that's the one I'm most familiar with (I worked with a couple of the guys who wrote it!), but you can use any one that has a "proxy" function. Apache, IIS, nginx, lighttpd and so-on can all do it. You should choose one that you're most familiar with.

Atlassian has good docs on rigging up Apache, IIS and nginx as a proxy for their services.


author: Yashin Vladislav
body: Apache need to install and configure on the server on which it is installed Confluence?

Apache can disrupt the work of the already existing proxy-server?


author: Nic Brough -Adaptavist-
body: Nope, the proxy can be on any server that can see the Confluence server, and the DNS resolves to that proxy.

It will conflict with existing proxies if it is on the same server as the proxies, unless you configure them to listen on different ports.


author: Yashin Vladislav
body: That I need to order administrators to ensure that the existing proxy server correctly worked with <http://confluence.soglasie.ru> without port 8090?


author: Nic Brough -Adaptavist-
body: I am sorry, I do not understand the question.


author: Yashin Vladislav
body: Our administrators should enable forwarding on the proxy server with http: //confluence.soglasie.ru on http: //confluence.soglasie.ru: 8090?


author: Nic Brough -Adaptavist-
body: No. They should proxy \<your server name\>:8090 to http: //confluence.soglasie.ru


author: Jeroen Overbeeke
body: Please take a look at

<https://confluence.atlassian.com/conf59/using-apache-with-mod_proxy-792499652.html>


author: Yashin Vladislav
body: [@Jeroen Overbeeke](/t5/user/viewprofilepage/user-id/53052) Thanks, but I don't have the rights to administer a proxy server