Commit bcb07929 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'nginx_defaulthost_documentation' into 'master'

Close #178 Nginx conf default_host documentation

This closes #178
We're just making it clear that some nginx installs such as by default on recent Ubuntu's, the /etc/nginx/sites-enabled/default file will conflict the listen line of the gitlab nginx conf's due to the default_server directive.

changed installation.md to identify the issue to a user
added notes to both nginx configs for gitlab and gitlab-ssl
[ci-skip

See merge request !225
parents 7bee9ce1 e338e85d
...@@ -368,6 +368,9 @@ Make sure to edit the config file to match your setup: ...@@ -368,6 +368,9 @@ Make sure to edit the config file to match your setup:
# Change YOUR_SERVER_FQDN to the fully-qualified # Change YOUR_SERVER_FQDN to the fully-qualified
# domain name of your host serving GitLab. # domain name of your host serving GitLab.
# If using Ubuntu default nginx install:
# either remove the default_server from the listen line
# or else rm -f /etc/sites-enabled/default
sudo editor /etc/nginx/sites-available/gitlab sudo editor /etc/nginx/sites-available/gitlab
**Note:** If you want to use HTTPS, replace the `gitlab` Nginx config with `gitlab-ssl`. See [Using HTTPS](#using-https) for HTTPS configuration details. **Note:** If you want to use HTTPS, replace the `gitlab` Nginx config with `gitlab-ssl`. See [Using HTTPS](#using-https) for HTTPS configuration details.
......
...@@ -40,6 +40,10 @@ upstream gitlab { ...@@ -40,6 +40,10 @@ upstream gitlab {
## Normal HTTP host ## Normal HTTP host
server { server {
## Either remove "default_server" from the listen line below,
## or delete the /etc/nginx/sites-enabled/default file. This will cause gitlab
## to be served if you visit any address that your server responds to, eg.
## the ip address of the server (http://x.x.x.x/)n 0.0.0.0:80 default_server;
listen 0.0.0.0:80 default_server; listen 0.0.0.0:80 default_server;
listen [::]:80 default_server; listen [::]:80 default_server;
server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com
......
...@@ -44,6 +44,10 @@ upstream gitlab { ...@@ -44,6 +44,10 @@ upstream gitlab {
## Redirects all HTTP traffic to the HTTPS host ## Redirects all HTTP traffic to the HTTPS host
server { server {
## Either remove "default_server" from the listen line below,
## or delete the /etc/nginx/sites-enabled/default file. This will cause gitlab
## to be served if you visit any address that your server responds to, eg.
## the ip address of the server (http://x.x.x.x/)
listen 0.0.0.0:80; listen 0.0.0.0:80;
listen [::]:80 ipv6only=on default_server; listen [::]:80 ipv6only=on default_server;
server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment