On 07/05/2015 12:02 AM, Nazeem Soeltan wrote:
> I have a ubuntu 14.04 server on Digital Ocean where I am running a
> Gitlab instance, which is accessible from |repo.mydomain.com| I want to
> set up a toran <https://toranproxy.com/> instance, which must be
> accessible from |toran.mydomain.com|
> 
> */However, I noticed that for every subdomain that points to the server,
> shows the Gitlab login page. Thus, when I browse to toran.mydomain.com
> or even test.xx.com it shows the Gitlab page. How can I fix this?/*
> 
> 
>     Gitlab configuration
> 
> I've modified some of the gitlab original configuration, an important
> modification is the use of my 'own' nginx instance in stead of the build
> in instance, following this guide
> <https://gitlab.com/gitlab-org/omnibus-gitlab/blob/629def0a7a26e7c2326566f0758d4a27857b52a3/doc/settings/nginx.md>.
> 
> My gitlab configuration (I used dummy values) is as follows:
> 
> |external_url 'http://repo.mydomain.com'
> gitlab_rails['gitlab_email_from'] = 'email'
> gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
> gitlab_rails['db_adapter'] = "postgresql" gitlab_rails['db_encoding'] =
> "unicode" gitlab_rails['db_database'] = "thdbname" #
> gitlab_rails['db_pool'] = 10 gitlab_rails['db_username'] = "theuser"
> gitlab_rails['db_password'] = "thepass" gitlab_rails['db_host'] =
> "localhost" gitlab_rails['db_port'] = 1337 gitlab_rails['smtp_enable'] =
> true gitlab_rails['smtp_address'] = "smtp.mandrillapp.com"
> gitlab_rails['smtp_port'] = 587 gitlab_rails['smtp_user_name'] = "email"
> gitlab_rails['smtp_password'] = "ojojowij" gitlab_rails['smtp_domain'] =
> "mlih.xx" gitlab_rails['smtp_authentication'] = "login"
> gitlab_rails['smtp_enable_starttls_auto'] = true postgresql['enable'] =
> false web_server['external_users'] = ['www-data'] nginx['enable'] = false |
> 
> The nginx configuration for gitlab is as follows:
> 
> |server { listen *:80; server_name repo.mydomain.com; server_tokens off;
> root /opt/gitlab/embedded/service/gitlab-rails/public;
> client_max_body_size 250m; access_log
> /var/log/gitlab/nginx/gitlab_access.log; error_log
> /var/log/gitlab/nginx/gitlab_error.log error; # Ensure Passenger uses
> the bundled Ruby version passenger_ruby /opt/gitlab/embedded/bin/ruby; #
> Correct the $PATH variable to included packaged executables
> passenger_env_var PATH
> "/opt/gitlab/bin:/opt/gitlab/embedded/bin:/usr/local/bin:/usr/bin:/bin";
> # Make sure Passenger runs as the correct user and group to # prevent
> permission issues passenger_user git; passenger_group git; # Enable
> Passenger & keep at least one instance running at all times
> passenger_enabled on; passenger_min_instances 1; error_page 502
> /502.html; } |
> 
> 

For starters, are you using passenger? You will either use that or
unicorn and I don't see having unicorn disabled in your gitlab.rb file.
Bare in mind that it's listening on port 8080 by default, see
`/var/opt/gitlab/gitlab-rails/etc/unicorn.rb`.

The config in the documentation might be missing some blocks. For
example I don't see the uploads/ location or the proxy_pass. On the
other hand I don't know how passenger works so I might be wrong.

In either case, one way to get a working nginx config is to configure
GitLab using its bundled nginx and then grab the generated
`/var/opt/gitlab/nginx/conf/gitlab-http.conf` to start making
modifications from there.

The template from where the config is generated can be found here
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb

I hope at least I pointed you to the right direction :)

-- 
Blog: http://axilleas.me

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/5598CE16.4070403%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to