Commit Graph

228 Commits

Author SHA1 Message Date
Achilleas Pipinellis cfc54df4a8 Set pages daemon to false 2017-01-31 22:55:29 +00:00
Achilleas Pipinellis deb9481efd Add missing variables for gitlab-pages
[ci skip]
2017-01-31 22:55:28 +00:00
Achilleas Pipinellis 4b45f284c9 Change the pages daemon proxy listen port to 8090
So as to be consistent with what is set in Omnibus
2017-01-31 22:55:28 +00:00
Achilleas Pipinellis 50bbc326a4 Change NGINX pages configs to account for the Pages daemon 2017-01-31 22:55:28 +00:00
Achilleas Pipinellis d5ccea0286 Add init scripts for GitLab Pages daemon 2017-01-31 22:55:28 +00:00
Kamil Trzcinski c66b15803a Fix confusing implementation detail in nginx config about how gitlab-pages work [ci skip] 2017-01-31 22:53:56 +00:00
Kamil Trzcinski 6c9ba469d9 Bring back GitLab Pages SSL config 2017-01-31 22:53:56 +00:00
Kamil Trzcinski 4afab3d4b6 Revert "Store pages in shared/pages/fqdn/fqdn/public or shared/pages/fqdn/subpath/public - makes it simpler to implement CNAMEs in future"
This reverts commit 86a2a78f0d13a678899460638add6b862059433e.
2017-01-31 22:53:55 +00:00
Kamil Trzcinski 94fdf58a87 Store pages in shared/pages/fqdn/fqdn/public or shared/pages/fqdn/subpath/public - makes it simpler to implement CNAMEs in future 2017-01-31 22:53:55 +00:00
Kamil Trzcinski 120f9abaa1 Add GitLab Pages
- The pages are created when build artifacts for `pages` job are uploaded
- Pages serve the content under: http://group.pages.domain.com/project
- Pages can be used to serve the group page, special project named as host: group.pages.domain.com
- User can provide own 403 and 404 error pages by creating 403.html and 404.html in group page project
- Pages can be explicitly removed from the project by clicking Remove Pages in Project Settings
- The size of pages is limited by Application Setting: max pages size, which limits the maximum size of unpacked archive (default: 100MB)
- The public/ is extracted from artifacts and content is served as static pages
- Pages asynchronous worker use `dd` to limit the unpacked tar size
- Pages needs to be explicitly enabled and domain needs to be specified in gitlab.yml
- Pages are part of backups
- Pages notify the deployment status using Commit Status API
- Pages use a new sidekiq queue: pages
- Pages use a separate nginx config which needs to be explicitly added
2017-01-31 22:50:39 +00:00
Mike Greiling 7e51cd32d3 update scripts and docs to reference the newly namespaced rake task 2017-01-27 15:23:09 -06:00
Nick Thomas eb09395b2b Upgrade NGINX configuration files to add websocket support 2016-12-12 12:58:42 +00:00
Jacob Vosmaer 427c9f0b5b Revert "Defend against 'Host' header injection"
This reverts commit 47b5b44139.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/17877#note_13488047
2016-08-08 13:02:44 +02:00
Jacob Vosmaer 47b5b44139 Defend against 'Host' header injection
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/17877 .

This change adds 'defense in depth' against 'Host' HTTP header
injection. It affects normal users in the following way. Suppose your
GitLab server has IP address 1.2.3.4 and hostname gitlab.example.com.
Currently, if you enter 1.2.3.4 in your browser, you get redirected to
1.2.3.4/users/sign_in. After this change, you get redirected from
1.2.3.4 to gitlab.example.com/users/sign_in. This is because the
address you typed in the address bar of your browser ('1.2.3.4'),
which gets stored in the 'Host' header, is now being overwritten to
'gitlab.example.com' in NGINX.

In this change we also make NGINX clear the 'X-Forwarded-Host' header
because Ruby on Rails also uses that header the same wayas the 'Host'
header.

We think that for most GitLab servers this is the right behavior, and
if not then administrators can change this behavior themselves at the
NGINX level.
2016-07-12 19:50:20 +02:00
Achilleas Pipinellis f55f628531 Add note about port needed in NGINX config 2016-05-22 19:20:28 -05:00
Achilleas Pipinellis c1af75192d Add NGINX config file for Registry 2016-05-22 14:54:29 -05:00
Achilleas Pipinellis c73bf28143 Replace gitlab-workhorse with GitLab Workhorse where appropriate 2016-04-28 17:36:50 +03:00
Robert Speicher d85f65ef4e Add a branded 503 static error page
[ci skip]

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15398
2016-04-22 16:26:42 -04:00
Achilleas Pipinellis 2165bbc785 Remove deprecated NGINX CI config 2016-04-14 20:31:19 +03:00
Artem Sidorenko fb5c2147a9 Do not serve anything via nginx as we have workhorse
Otherwise this might 'hide' problems
https://github.com/gitlabhq/gitlabhq/issues/10053#issuecomment-188919319
2016-03-11 15:04:04 +01:00
Achilleas Pipinellis 10aa99a30c Merge branch 'doc_relative_url' into 'master'
Add documentation on relative URL support

closes #12773

See merge request !2770
2016-02-10 10:51:18 +00:00
Achilleas Pipinellis b532109b97 Edit configuration files for relative URL support
[ci skip]
2016-02-09 16:59:42 +02:00
Rémy Coutable 555b1a621a Merge branch 'fix-init' into 'master'
Fixed init.d script not working on OS X

-s flag of su doesn't work correctly on OS X, logging in as the user
and not running the requested command. By moving the bash shell init
inside the su command we avoid the issue

Fixes Issue #3309 

See merge request !1728
2016-02-08 17:30:10 +00:00
ritave 1fab3979b1 Fixed init.d script not working on OS X
-s flag of su doesn't work correctly on some systems, loging in the user
and not running the requested command. By moving the bash shell init
inside the su command we avoid the issue
2016-02-08 16:56:07 +01:00
Harald Spaethe 2694513cfe suppress only errors in init-script while determining canonical path of gitlab_workhorse_dir 2016-02-08 14:58:49 +01:00
fbretel 5287da7412 Consistent rails_socket use. 2016-01-25 13:19:27 +00:00
Jacob Vosmaer 693fa7a458 Init script changes for gitlab-workhorse in 8.4 2016-01-21 13:36:55 +01:00
cafuego 9c893af7ad Fix spelling of "it's" to "its" where appropriate. 2015-12-24 15:28:12 +11:00
Jacob Vosmaer 447e598ec4 Update init script options for gitlab-workhorse 2015-12-15 16:24:04 +01:00
Jacob Vosmaer d597a0a21a Pass all requests from NGINX to gitlab-workhorse 2015-12-11 16:42:40 +01:00
Jacob Vosmaer b899436248 Merge pull request #9892 from stetskevych/fix_nginx_ssl_config
Fix gitlab-ssl nginx config to work when multiple server_names are served over https
2015-12-07 14:03:33 +01:00
Vyacheslav Stetskevych 1c4213acd5 Fix gitlab-ssl nginx config to work when multiple server_names are served over https 2015-12-06 03:10:29 +02:00
Stan Hu f1fd4880d9 Check GitLab Workhorse status in init.d script when reporting all components are up and running
Closes https://github.com/gitlabhq/gitlabhq/issues/9869
2015-12-04 07:12:49 -08:00
Robert Speicher f1710073b4 Fix alignment
[ci skip]
2015-11-27 14:39:55 -05:00
Jacob Vosmaer 04049b6b17 Fix indentation in NGINX config 2015-11-27 13:57:53 +01:00
Jacob Vosmaer 295d378e9a Repeat "client_max_body_size 0" everywhere
It turns out that if we do not the declaration from
"location /" wins.
2015-11-27 13:56:26 +01:00
Robert Speicher c8074b6b11 Merge branch 'client-max-body-size' into 'master'
Do not limit workhorse POST/PUT size in NGINX

Limiting, if any, should happen in gitlab-workhorse.

See merge request !1831
2015-11-19 14:41:44 +00:00
Jacob Vosmaer 372dcc217e Do not limit workhorse POST/PUT size in NGINX
Limiting, if any, should happen in gitlab-workhorse.
2015-11-19 13:51:18 +01:00
Drew Blessing cab6efa53f Deploy page should be shown for all pages not just root 2015-11-18 09:53:08 -06:00
Marin Jankovski 14032d8eb1 Add support for git lfs. 2015-11-16 12:39:13 +01:00
Kamil Trzcinski 7e4e3fb3b6 Fix nginx config to use @gitlab-workhorse 2015-11-10 12:51:51 +01:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Jacob Vosmaer c5132e94e1 Switch to gitlab-workhorse 2015-10-29 14:21:24 +01:00
Jacob Vosmaer 033a879cc9 Fix NGINX API download regex
Users are allowed to supply namespace%2Fproject instead of a numeric ID
2015-10-14 11:14:43 +02:00
Jacob Vosmaer cb13980db8 Let gitlab-git-http-server handle archive downloads
This change relies on changes in gitlab_git and gitlab-git-http-server.
2015-10-08 17:12:00 +02:00
Kamil Trzcinski 156ace4778 Add missing rake and change nginx config for CI migration 2015-09-22 09:45:52 +02:00
Kamil Trzcinski 50e5950947 Add missing proxy requests to migration docs 2015-09-16 20:45:58 +02:00
Kamil Trzcinski d3886f9d41 Added migration docs and updated installation documentation 2015-09-16 10:58:33 +02:00
Jacob Vosmaer 783791fd08 The good stuff needs NGINX 1.7.11 2015-09-07 14:59:32 +02:00
Jacob Vosmaer 8d59b1ac45 Do not let NGINX buffer Git HTTP requests
Before this change NGINX would convert a chunked HTTP POST (e.g.
git push) into a HTTP 1.0 single large POST. This creates an
unnecessary delay, and it creates unnecessary memory pressure on
gitlab-git-http-server.

For the response ('proxy_buffering') I am less sure that NGINX 's
buffering behavior is harmful, but it still makes more sense to me
not to interfere with gitlab-git-http-server (and the Golang net/http
server).
2015-09-07 13:05:29 +02:00
Jacob Vosmaer 780bac1026 Be more defensive when running 'kill' 2015-08-31 16:15:41 +02:00
Jacob Vosmaer 4027a26e7b Replace grack with gitlab-git-http-server 2015-08-31 15:30:15 +02:00
Douwe Maan 02e7b00a54 Fix init script for Reply by email 2015-08-25 12:03:58 -07:00
Douwe Maan 9501495aeb Fix init.d script. 2015-08-19 17:43:24 -07:00
Douwe Maan 1202875dff Fix lib/support/init.d/gitlab. 2015-08-19 14:54:30 -07:00
Douwe Maan f3b57ce677 Update init scripts. 2015-08-19 13:58:07 -07:00
Jacob Vosmaer d3305df7aa Experimental support for gitlab-git-http-server
https://gitlab.com/gitlab-org/gitlab-git-http-server

This change introduces the GITLAB_GRACK_AUTH_ONLY environment
variable. When set, Grack requests to GitLab will only respond with
the user's GL_ID (if the request is OK) or an error. This allows
gitlab-git-http-server to use the main GitLab application as an
authentication and authorization backend.

If we like how this works we should drop the GITLAB_GRACK_AUTH_ONLY
variable at some point in the future.
2015-07-28 14:33:19 +02:00
Jacob Vosmaer 83304bf410 Merge pull request #9400 from tuxillo/patch-1
Use whoami instead of $USER
2015-07-20 11:45:34 +02:00
Dmitriy Zaporozhets bcb07929fe 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
2015-06-22 13:22:58 +00:00
Antonio Huete Jimenez e9ef274bb2 Use whoami instead of $USER
- Use whoami instead of relying on the existence of $USER enviroment variable which is not always present
2015-06-19 09:01:35 +02:00
Marin Jankovski 86d35ed3d4 Update SSL ciphers per logjam vulnerability recommendations. 2015-06-15 11:40:00 +02:00
Marin Jankovski df346e9507 Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
Marin Jankovski c4cb563e98 Merge pull request #8730 from drunkard/master
Specify shell while run me as git user
2015-06-02 16:19:31 +02:00
Drunkard Zhang ef351f4cf4 Improve comments for shell_path 2015-05-04 16:46:16 +08:00
Vasilij Schneidermann 6235b027ec Fix typo 2015-03-14 10:22:06 +01:00
Douwe Maan d513ca584a Revert "Merge branch 'go-get-workaround-nginx' of https://github.com/mattes/gitlabhq into mattes-go-get-workaround-nginx"
This reverts commit 51349ca3c8, reversing
changes made to b180476bd6.
2015-03-03 11:21:48 +01:00
Marin Jankovski 51349ca3c8 Merge branch 'go-get-workaround-nginx' of https://github.com/mattes/gitlabhq into mattes-go-get-workaround-nginx
Conflicts:
	lib/support/nginx/gitlab
	lib/support/nginx/gitlab-ssl
2015-02-20 15:47:34 -08:00
Douwe Maan 26d57a648c Restore nginx config a little more. 2015-02-20 23:32:39 +01:00
Douwe Maan 08874d2b51 Make changes to nginx config less likely to break something. 2015-02-20 23:27:17 +01:00
Douwe Maan eb210f4a18 Modify nginx config to let /uploads go through to unicorn. 2015-02-20 12:22:53 +01:00
Drunkard Zhang 4c5adb702c Specify shell while run me as git user
Some users disabled "git" user's shell after finished installation, this
will lead to "This account is currently not available" and could not
run /etc/init.d/gitlab, this dirty trick fix it.

Signed-off-by: Drunkard Zhang <gongfan193@gmail.com>
2015-02-04 09:36:51 +08:00
mattes 2c9b357324 remove optional html tags 2014-12-31 18:37:31 -08:00
mattes 56f211aa50 allow for private repositories 2014-12-31 18:37:31 -08:00
Luke Ashe-Browne e338e85d1b fixed typo 2014-12-03 13:35:27 +00:00
Luke Ashe-Browne 32c6fe5385 adding notes to gitlab nginx conf
We want to make users aware that the nginx default config will conflict
with the gitlab default_server conf file.
2014-12-03 10:43:27 +00:00
sbeh 434c4a2b5d Socket [::]:123 on Linux listens on IPv4 and IPv6
This will ensure nginx starts up without the following errors messages:
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()

Googling for them leads you to this site:
https://chrisjean.com/2014/02/10/fix-nginx-emerg-bind-to-80-failed-98-address-already-in-use/
2014-11-26 00:31:50 +01:00
Marin Jankovski 70f30abd84 Merge pull request #8273 from bbodenmiller/nginx-updates
Nginx updates
2014-11-10 10:20:44 +01:00
Ben Bodenmiller 271a352079 minor updates & formatting changes
minor updates @ formatting changes to match other versions of file.
Unify formatting of
https://github.com/gitlabhq/gitlabhq/blob/master/lib/support/nginx/gitlab,
https://github.com/gitlabhq/gitlabhq/blob/master/lib/support/nginx/gitlab-ssl,
&
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb
2014-11-08 23:33:27 -08:00
Hugo Osvaldo Barrera e3098b69e7 Don't enable IPv4 *only* on nginx.
The current configuration sample files only enable IPv4 by default, making the
server inaccesible for many remote hosts (and an increasing amount every day).

Enable IPv4 and IPv6 by default. Older servers with no external IPv6
connectivity will not fail since they'll have a local-link IPv6 address to bind
to anyway.
2014-11-03 11:25:31 -03:00
Dmitriy Zaporozhets 80e944ac71 Merge pull request #8054 from bbodenmiller/patch-4
match latest config from https://cipherli.st/
2014-10-22 16:52:42 +03:00
Ben Bodenmiller 077fc683fa simplify DHE parameter generation 2014-10-16 14:34:03 -07:00
Ben Bodenmiller 5d7e1b6ae2 match latest config from https://cipherli.st/ 2014-10-15 23:51:53 -07:00
Marin Jankovski be14c7a83f Add a comment on why we are using backward compatible ciphers. 2014-10-10 09:44:08 +02:00
Marin Jankovski 8ddb2be69a Revert "update ssl_ciphers"
This reverts commit c41e5f5018.
2014-10-10 09:38:39 +02:00
Sytse Sijbrandij 0cc30145f4 Merge pull request #7664 from bbodenmiller/patch-2
add HSTS Policy warning
2014-10-03 12:12:23 +02:00
Ben Bodenmiller 25ee53c3ae fail_timeout=0 as recommended by Unicorn
Set's fail_timeout=0 as recommended by
http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-timeout
when Unicorn is running behind nginx.
2014-09-12 02:19:38 -07:00
Sytse Sijbrandij 69c4026ec1 Merge pull request #7654 from bbodenmiller/patch-13
update ssl_ciphers
2014-09-08 15:07:59 +02:00
Sytse Sijbrandij bef923055b Merge pull request #7583 from bbodenmiller/https
[Documentation] simplify HTTPS setup details
2014-09-08 11:05:19 +02:00
Ben Bodenmiller a2b36858f5 add optional nginx configs to make more secure 2014-09-07 23:17:37 -07:00
Ben Bodenmiller 5d5d4ef91a simplify HTTPS setup details
also adds comment about updating nginx files during upgrades
2014-09-07 15:31:13 -07:00
Ben Bodenmiller c41e5f5018 update ssl_ciphers
taken from
https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html /
https://cipherli.st/

backwards compatible ciphers not needed since gitlab does not support
ie8
2014-09-07 14:55:11 -07:00
Ben Bodenmiller 765eabeacc add HSTS Policy warning
Add warning about HSTS header as it means user will need to provide secure connection access to site for next 24 months from page view. See https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security for more details.
2014-09-01 15:47:15 -07:00
Dmitriy Zaporozhets 3069826d1a Merge pull request #7378 from jojosch/nginx-ssl-redirect
Use a ? after the $request_uri to perform a valid Redirect while cloning...
2014-08-28 16:54:36 +03:00
Dmitriy Zaporozhets eddfdc9edd Merge pull request #7558 from bbodenmiller/patch-4
change X-Frame-Options to SAMEORIGIN for nginx SSL config
2014-08-23 23:50:09 +03:00
Ben Bodenmiller 3663354cb9 unify nginx config files 2014-08-23 01:08:12 -07:00
Ben Bodenmiller a3953a46f4 change X-Frame-Options to SAMEORIGIN
needed to allow sidekiq to load on background jobs tab
2014-08-23 01:05:31 -07:00
johannes b5481afd73 Use a ? after the $request_uri to perform a valid Redirect while cloning.
fixes #6203

before:

❯ curl -I http://gitlab/namespace/repo.git/info/refs?service=git-upload-pack
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 26 Jul 2014 18:20:27 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://gitlab/namespace/repo.git/info/refs?service=git-upload-pack?service=git-upload-pack

after:

❯ curl -I http://gitlab/namespace/repo.git/info/refs\?service=git-upload-pack
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 26 Jul 2014 18:23:54 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://gitlab/namespace/repo.git/info/refs?service=git-upload-pack

[ci skip]
2014-08-23 08:36:25 +02:00
Sytse Sijbrandij 06fade7545 Simplify the description of single hash lines based on comments of Ben Bodenmiller. 2014-08-22 19:10:07 +02:00
Sytse Sijbrandij 8aff39a6d0 Simplify the ssl setup file. 2014-08-04 15:57:59 +02:00
Achilleas Pipinellis 7be6b8ca73 Move gitlab-ssl nginx config from gitlab-recipes 2014-06-05 16:54:50 +03:00