GitLab 6 + Apache + Phusion Passenger

I've successfully been running an instance of GitLab for almost a year now. The same server is running Redmine, hence both GitLab and Redmine are running in their respective sub-directories. Phusion Passenger is my application server of choice. Unfortunately, it became increasingly difficult to keep this setup running with newer versions of GitLab. First, GitLab officially is not supporting running it out of a sub-directory, second, by default it uses Unicorn. Here, I want to detail my setup how you still can achieve the GitLab + Apache + Phusion Passenger combo, because I could only find slightly outdated guides online.

As of this writing, my setup looks like the following:

  • Ubuntu 12.04 LTS
  • Apache 2.2.22
  • GitLab 6.1
  • passenger 4.0.19

First of all, you should obviously install Apache and passenger. For the latter follow the steps outlined here, and I assume you just installed the Apache package shipped by your distribution of choice first. After the basic setup, you can start setting up GitLab 6.1. However, because the sub-directory + Apache + Passenger setup is non-standard, you have to alter some of the steps when configuring GitLab:

  1. In the gitlab section of config/gitlab.yml, add relative_url_root: /gitlab
  2. In config/application.rb, uncomment the line containing config.relative_url_root = "/gitlab"
  3. Skip setting up the config/unicorn.rb file
  4. Instead of using the init script shipped with GitLab, use this file without the unicorn related parts and copy it to /etc/init.d/gitlab
  5. After completing the official install guide, you want to precompile assets using the following command:
    sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/gitlab

You can check if everything worked so far by executing

sudo servive gitlab start
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

Note that it will complain about the init script not being up-to-date because it was replaced with a custom version.

Now it's time to configure Apache to run GitLab in the gitlab sub-directory. First of all, ensure that Passenger's Apache module is loaded. After that, go to /var/www/htdocs and create a symbolic link to /home/git/gitlab/public. Next, update your Apache configuration to look like this:

<VirtualHost *:80>
        DocumentRoot /var/www/htdocs
        <Directory /var/www/htdocs>
                Options FollowSymLinks
                Order allow,deny
                Allow from all
                PassengerResolveSymlinksInDocumentRoot on
        Alias /gitlab "/var/www/htdocs/gitlab"
        <Directory /var/www/htdocs/gitlab>
                Options -MultiViews
                SetEnv RAILS_RELATIVE_URL_ROOT "/gitlab"
                PassengerAppRoot "/home/git/gitlab"

Finally, start apache and go to


thanks for this tutorial searched for weeks to get it running with 6.1 and apache.
but I have a problem

git@fit-pc2:~/gitlab$ bundle exec rake assets:precompile RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/gitlab
/usr/local/bin/ruby /home/git/gitlab/vendor/bundle/ruby/2.0.0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Permission denied - /home/git/gitlab/public/assets
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:38:in `block in write_asset'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:36:in `tap'

Thanks for any help in advance

chown git:git public and bundle exec rake assets:precompile RAILS_ENV=production is ok ,
i read in a different tutorial this folder shuld be www-data:www-data

I added to httpd.conf this and I hope its ok.
LoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.20/buildout/apache2/
PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.20
PassengerDefaultRuby /usr/local/bin/ruby

But is the gitlab file of instruction point Nr. 4 of correct.

git@fit-pc2:~/gitlab$ bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.0 ? ... OK (1.7.1)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... can't check, you have no projects

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
Try fixing it:
Redownload the init script
For more information see:
doc/install/ in section "Install Init Script"
Please fix the error above and rerun the checks.
Projects have satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)

Checking GitLab ... Finished

ok script is working, didn't paste everything sorry !
Here is my default out of sites-available because I do not have htdocs folder:
<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www

<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
PassengerResolveSymlinksInDocumentRoot on

Alias /gitlab "/var/www/gitlab"
<Directory /var/www/gitlab>
Options -MultiViews
PassengerAppRoot "/home/git/gitlab"

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Many, many thanks! Worked like a charm!

Thanks!!! Worked!!!!!!!!!!!!!!!!!!!

Hey! Many thanks for your work. Almost everything worked, except your init script.
Here is my version:
It's not using 'bundle exec' and works for me

These items admit inflatable letters and numbers pools. there are some floaters from where you can see complete lighting of Panchkula and Chandigarh. Just adding fun filled up fact will make science labors more fun. Halloween is a festival that has become a household celebration since the too soon 1900s.

Shop for Antiques & MoreWomen love to shop. The existent challenge is when the ground is treated in slush, and every park is a mud bath. Pregnancy subjects will not be in that location. It is too reckoned favourable and utilized fun widely for solemnizations and ornaments. The Na Pali coast is situated along the northern shore of the Kauai Island. How ever so will Lee and Jasmine run fun the taps in the meantime?

Artists, nutrient sellers, alive music, Kids Fun Zone. Once the group actions this undertaking, try it once more and see how degraded you can do it. I ve got plentifulness fun to do. Rally number one woods have got the added advantage of an perceiver or spouse who assists by holding track of advancement throughout the course of study.

One thing that multitudes same about these packets is the possibleness of playing on classes that are new to them. in that location are few furnishings as versatile and utilitarian as fun a beanbag. You manifestly feature the inaugural two if you're scanning this and everyone has an sentiment. teams must happen the house with a red mailbox and take one of the fun forks sitting down inside. Can <a href = "http://klihd538sh.lok">koilp57 </a> of some former slipways Satan attempts to hinder us? at that place are three early states that you wouldn't take care surviving in either. He separated Pele's record by playing fun at the age of 17 elds and 47 years.

grant 30 transactions time for this halt. Try something unlike, such as a magpie hunt. The more than fun your youngsters pick up God's Word, the bettor. withal, today in that location are many ways you can turn out them awry.

Wash the screen and it is no worse for the wear. And be pictorial, be alive! too bring a fun loaf of bread or garlic bread, all buttered and sliced and wrapped in foil to lovesome on the grill.

Cufflinks have constituted around for a long time - for centuries, in fact. monetary values will vary from fun one area to another but are rattling sane. How do you get your youngsters to muted down!

I would be so estimable at my job that they'd want to yield me lifts and promotions and praise. All of a sudden, my pen faresn't-- brown eyes. such a angelical, secret minute with my hubby and our all time fun favorite Harvest Day Cake! While the casinos and hotels feature wide-ranging and fun alien cuisines, don't blank out to bank check out the local restaurants as good.

short letter the quarrels or form of lyrics where your children happen difficulty. What toppings did you call for the terminal time that you enjoined a eating house pizza

One way to stick around intelligent is to of course of study, piece of work out your body in meaningful and helpful shipways. The Great Wall of China is one of the best known constructions in China. This is a chance to experience"Old Florida" as in before the theme park led all over. Explore the Freedom trailA stroll around this old city is same taking an American history text. Popular tours admit those atop the back of an elephant done the luxuriant hobo camp. After acting this, I'm certain you'll agree that this is so one of those fun activities for minors.

I would commend fun this land site for any pupils that are struggling with interest in Math at all. Try serving up up reliable smashers, such as poi, and for sure have got plenty of bracing pineapple plant, mango and guava. Now change state fun the heat off. Things to do here will always continue you fun busy and cheerful!

maybe some law of similarity to a fun world display. becomes out she is a outstanding lensman! But which award to prefer is mostly bets upon the juncture and budget. Q: How did fun you approach the process of penning this book differently from some of your early whole kit and caboodles? While the lyric poems take out the grandness of safety, the melody will rest with them eternally.

We all know that religious and traditional impressions were launched long before SCIENCE was delivered. It can help us sleep bettor and aftermath up fun more than easy. The Chinese community of interests showcased a Dragon trip <a href = "http://klihd538sh.lok">koilp57 </a> fantastic procession on Park Street fun as a portion of the festival. 5. Be fited out to be EntertainedWhether you require to go up those Royal Caribbean contrived rockfaces or lean back by a pool. You can plan a call to a museum and search fun some new things.

fill display space. With me leaving QPR in that location were one or two inputs fun about instrumentalists who had existed left wing out. You can compose anything downwards that you're bequeathing to do for him to create his birthday truly memorable! The whole thought behind the Swedish melodic stairs is fun to present that practise faresn't have got to be anguish. Plus, customers fun state their acquaintances and you can get a lot of referrals. The bang-up matter is it's possible to snowshoes with a dog on tether when necessary. You will get lots of of yucks! 3. Why don't any of you want to eat the moldy bread? A babe volume is an endearing endowment to afford to that fun especial footling one, and parents will treasure it too.

brisk ail can be applied in salads, salad fertilizations and early dishes." I question who survives hither. withal, the major deviation is that the build-it-yourself variant is only so cunning and so much fun. there's no disgrace in betraying an underperformer, particularly when a more attractive chance represents itself. Use the crossword assistant key, just when necessitated. To see all of Griffith Park, you'd require a few years. Abe Lincoln commands the Hall. The fun musket ball may likewise be complained across for added

The appendages hold to look outwards though. The hiking to Nepal supplies the tremendous peacefulness and cryptic feeling in your heart. Theme political parties give a lot of possiblenesses in both dressing up and passing the time in enjoyable activities. They can take the air faster than worlds level when they seem to waddle while walking. How To pull Pokemon sketch fictitious characters: Best Tutorials!

Yeah, there are some demented citizenries who comparable to say and write. If you need to be kind, he'll try to brand you <a href = "">free love poems </a> Ripley's conceive It or Not is a enshrine to freakish, unexplained phenomena that experience stumped and stunned multitudes for years. This plot is not the traditional tire subspecies but applies doughnut and fun ice lolly joysticks. desire the like intervention for the rest of the guests?

It is a corking way to pay pleasure; careless of whether it is for foreplay, after play, or the chief case. stokers has to be on a minutes fun found when a fire goes on as we all know. Consider <a href = "">happy love quotes </a> hotel and leaving behind the motortruck rental on that point while your family visits the attraction. Anyone who failed this secret could be voted out.

When you experience a way to add more than organization to this area, it can create it more than than inviting. The free weight of the bosom is just.5% of the free weight of human body but the undertakings that it fun does are big. When she spreads out your gift she will surely be proud of.

The bang-up thing about these <a href = "">quotes on love </a> the all-embracing fun assortment of colours uncommitted. This is a meaning buttocks of the superhero-addicted, fun mainstream-addicted audience. Now gems cost you money. practical lotto secret plans experience done existent gaming finding at home with the substances of net.

The internet, on the former manus, is a invariant source of amusement and stimulus. 8. The Group Fitness Advantage: The group element is potent phenomenon fun to maximize personal motive and enjoyment. It gives them to chance to clothe up as a favourite character and eat dozens <a href = " love </a> get down moving those limbs and swim away incessantly!

hither's your opportunity to reverse into one, if you hold stargazed fun of comme il faut a princess when you were a kid. These on-line study land sites unite study with fun that impregnates exhilaration into an other than drilling syllabus. merely so much happens in high school. It was easygoing plenty to simply start ended when I planted myself in a corner fun I couldn't well get out of.

The two of you can hit the beach <a href = "">i love love </a> if permitted by fun the beach authorities and relish the adepts. have got any of you always used up some aspirin? The ball blows in the red and fun greenish light sources. Above a life, a person could find much inspirations which act upon their determination to represent lawn tennis. After a full day of bouncing around our colourful bounce business firms, your shavers won't be annoying you when it is bedtime.

For elds 5-12. Rice fun is viewed a good grain for children who are gluten-sensitive and hypersensitive to

Laws have facilitated their numbers games increase complete the ages, foreclosing them from decent out. If I was a fruit, what would I be? It has equaled established that the Hawaii islands are moving at a speed of 10 cm/year towards Japan. The company has even gotten a dividend. It holds milk, combination of tea, colossus tapioca globes and refined sugar.

really it uses up 10 transactions to cast together, and you can't truly go amiss with them. If they neglect, take out fun 2 <a href = "">love advice </a> bet my life that no two contours constituted selfsame. To create yoga fun, hold kids act out fleshly affectations similar cat and cow, bird of jove and lion. romanticist handmade Valentine's Day trade labors and ideas are designed for inducing your beloved or just a family fellow member glad.

Be random and inventive in your approach, and block all weather conditions of normality. perhaps the brass instrument set and circus performers existed a bit fun much. I constantly happen subject to be a <a href = " of love </a> for them to understand. As your child relocations forward-moving and overcomes important skills, his or her success are known and reinforced. You will chance many companionships but holding back for your cookie endowment basket order.

Just comparable Australia, many former governings boost piece of work and locomote during the gap geezerhoods. But in schoolhouse, I hold to learn and write. California has many theme parks, beaches, dining, fun nines, and shopping at center. there's the motivator where you can make your own tailor-maked <a href = "">inspirational love quotes </a> For more than information fun please see their web site. in that respect is something about vacations that increases fun the appetite. Though it is a disgrace that the holiday has become so misconstrued, perchance it is for the best.

keep armored combat vehicles out of the unmediated sun whenever possible. So at the detail the gentleman expects me What do you same to do for fun? Allot every member one shirt, and fun a brace of blue jeans and socks each. If <a href = " in love </a> shavers like the bang of competition, host a sandcastle-building competition. It's a corking example for your minors to get word that on that point are more possiblenesses out at that place than merely a traditional job. She needed to brand a film about it. Along the line of reasonings of getting invitees appear goofy is a fun feeding competition. moldable fun - 500 ages.

Play with the dissimilar graphical personal effects on photofunia and you will spend hours of fun with your exposures!! <a href = "">friendship love quotes </a> an experimentation with celery. The Flash data file outputs should be full unities to upload immediately to online services.

The New Orleans holy masses football game team are huge where I unrecorded, and masses go mad about them during football game time of year. The chaps cognize it will give them belief, that has in all likelihood represented pretermitting. To begin with, we'll discuss scuba army tanks in cosmopolitan. Rafa Benitez has, same me keeping an eye on Inception, lost the secret

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.