# Nginx down after installing Mattermost with GitLab CE on Windows Azure

**URL:** <https://forum.mattermost.com/t/nginx-down-after-installing-mattermost-with-gitlab-ce-on-windows-azure/1759>\
**Category:** Troubleshooting\
**Created:** [June 23, 2016, 4:08pm UTC](https://forum.mattermost.com/t/nginx-down-after-installing-mattermost-with-gitlab-ce-on-windows-azure/1759 "2016-06-23T16:08:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kinshuk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/kinshuk/32/766_2.png) [@kinshuk](https://forum.mattermost.com/u/kinshuk)\
**Post date:** [June 23, 2016, 4:08pm UTC](https://forum.mattermost.com/t/nginx-down-after-installing-mattermost-with-gitlab-ce-on-windows-azure/1759/1 "2016-06-23T16:08:55Z")

</div>

Hi Folks

I recently discovered Gitlab CE and Mattermost and wanted to give it a try within my organisation. All my servers run on Windows Azure right now and so I went ahead and started a new virtual machine with a ready-made Gitlab CE image.

The new machine runs absolutely fine and I was able to add users, create groups and projects. Worked like a charm. For Gitlab I was using:

`external_url 'http://dev.mydomain.com'`

(Edit: this was actually a long random url created by Azure and I had to change it to this value for everything to work)

Next step for me was to setup Mattermost. I read the documentation and went ahead to edit `/etc/gitlab/gitlab.rb`

I only set:  
`mattermost_external_url 'http://chatter.mydomain.com'`

These are the only two active lines in my gitlab.rb

Now when I run `sudo gitlab-ctl reconfigure`, after a huge block of text, I see the following success message:

`Running handlers: Running handlers complete Chef Client finished, 5/292 resources updated in 08 seconds gitlab Reconfigured!`

Now, when I try to access both my sites: [dev.mydomain.com](http://dev.mydomain.com) and [chatter.mydomain.com](http://chatter.mydomain.com), I get a 521 error.

I get the following status for Gitlab on the server:

`devlab:~$ sudo gitlab-ctl status run: gitlab-workhorse: (pid 33034) 1424s; run: log: (pid 1253) 18293s run: logrotate: (pid 33043) 1423s; run: log: (pid 1255) 18293s run: mattermost: (pid 33049) 1423s; run: log: (pid 29284) 2434s down: nginx: 0s, normally up, want up; run: log: (pid 1278) 18293s run: postgresql: (pid 33163) 1389s; run: log: (pid 1282) 18293s run: redis: (pid 33137) 1392s; run: log: (pid 1251) 18293s run: sidekiq: (pid 33146) 1390s; run: log: (pid 1284) 18293s run: unicorn: (pid 33172) 1389s; run: log: (pid 1261) 18293s`

I can see that nginx is down, and I am completely clueless how to get it up.  
What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![kinshuk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/kinshuk/32/766_2.png) [@kinshuk](https://forum.mattermost.com/u/kinshuk)\
**Post date:** [June 23, 2016, 4:22pm UTC](https://forum.mattermost.com/t/nginx-down-after-installing-mattermost-with-gitlab-ce-on-windows-azure/1759/2 "2016-06-23T16:22:58Z")

</div>

It turns out I had Azure to blame for my troubles. When Azure installed Gitlab, they had created a random long url which worked for their internal network feature. Once I changed it to [http://dev.mydomain.com](http://dev.mydomain.com), it worked out fine.

Now I have Mattermost up and running. But there is a new problem. Instead of speaking to my gitlab at [dev.mydomain.com](http://dev.mydomain.com), Mattermost is speaking to it at the older long url created by Azure.

I cant seem to find any place in the configuration where I can change that.  
Time to read more documentation.

~\_~

---

<div class="post-metadata">

**Author:** ![jwilander](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/jwilander/32/8440_2.png) [@jwilander](https://forum.mattermost.com/u/jwilander)\
**Post date:** [June 28, 2016, 12:43pm UTC](https://forum.mattermost.com/t/nginx-down-after-installing-mattermost-with-gitlab-ce-on-windows-azure/1759/3 "2016-06-28T12:43:37Z")

</div>

Hi @kinshuk,

It’s possible you need to update the Callback URLs for the Application entry of Mattermost inside your GitLab instance.

Can you try:

1. Logging into your GitLab instance as the admin
2. Going to the **Admin area** -\> **Applications**
3. Then click **Edit** on **GitLab-Mattermost**
4. Update the Callback URLs to your new domain/URL
5. **Save** the changes

Then try to use Mattermost with GitLab again.
