Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
582646ff
Commit
582646ff
authored
May 14, 2014
by
Sytse Sijbrandij
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gzip_assets_warning' into 'master'
Gzip assets warning for relative urls
parents
c91300e4
636ec6d3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
19 deletions
+12
-19
config/application.rb
config/application.rb
+4
-1
config/gitlab.yml.example
config/gitlab.yml.example
+2
-9
config/unicorn.rb.example
config/unicorn.rb.example
+2
-8
lib/support/nginx/gitlab
lib/support/nginx/gitlab
+4
-1
No files found.
config/application.rb
View file @
582646ff
...
@@ -66,13 +66,16 @@ module Gitlab
...
@@ -66,13 +66,16 @@ module Gitlab
# Version of your assets, change this if you want to expire all your assets
# Version of your assets, change this if you want to expire all your assets
config
.
assets
.
version
=
'1.0'
config
.
assets
.
version
=
'1.0'
# Relative url support
# Uncomment and customize the last line to run in a non-root path
# Uncomment and customize the last line to run in a non-root path
# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
# Note that fo
ur
settings need to be changed for this to work.
# Note that fo
llowing
settings need to be changed for this to work.
# 1) In your application.rb file: config.relative_url_root = "/gitlab"
# 1) In your application.rb file: config.relative_url_root = "/gitlab"
# 2) In your gitlab.yml file: relative_url_root: /gitlab
# 2) In your gitlab.yml file: relative_url_root: /gitlab
# 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
# 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
# 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
# 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
# 5) In lib/support/nginx/gitlab : do not use asset gzipping, remove block starting with "location ~ ^/(assets)/"
#
# To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
# To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
#
#
# config.relative_url_root = "/gitlab"
# config.relative_url_root = "/gitlab"
...
...
config/gitlab.yml.example
View file @
582646ff
...
@@ -24,15 +24,8 @@ production: &base
...
@@ -24,15 +24,8 @@ production: &base
# Otherwise, ssh host will be set to the `host:` value above
# Otherwise, ssh host will be set to the `host:` value above
# ssh_host: ssh.host_example.com
# ssh_host: ssh.host_example.com
# Uncomment and customize the last line to run in a non-root path
# WARNING: See config/application.rb under "Relative url support" for the list of
# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
# other files that need to be changed for relative url support
# Note that four settings need to be changed for this to work.
# 1) In your application.rb file: config.relative_url_root = "/gitlab"
# 2) In your gitlab.yml file: relative_url_root: /gitlab
# 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
# 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
# To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
#
# relative_url_root: /gitlab
# relative_url_root: /gitlab
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
...
...
config/unicorn.rb.example
View file @
582646ff
...
@@ -8,14 +8,8 @@
...
@@ -8,14 +8,8 @@
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
# documentation.
# Uncomment and customize the last line to run in a non-root path
# WARNING: See config/application.rb under "Relative url support" for the list of
# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
# other files that need to be changed for relative url support
# Note that four settings need to be changed for this to work.
# 1) In your application.rb file: config.relative_url_root = "/gitlab"
# 2) In your gitlab.yml file: relative_url_root: /gitlab
# 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
# 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
# To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
#
#
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
...
...
lib/support/nginx/gitlab
View file @
582646ff
...
@@ -59,6 +59,9 @@ server {
...
@@ -59,6 +59,9 @@ server {
}
}
# Enable gzip compression as per rails guide: http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression
# Enable gzip compression as per rails guide: http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression
# WARNING: If you are using relative urls do remove the block below
# See config/application.rb under "Relative url support" for the list of
# other files that need to be changed for relative url support
location ~ ^/(assets)/ {
location ~ ^/(assets)/ {
root /home/git/gitlab/public;
root /home/git/gitlab/public;
gzip_static on; # to serve pre-gzipped version
gzip_static on; # to serve pre-gzipped version
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment