Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample config for apache2 + passenger #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions apache/gitlab-with-passenger.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# quick and dirty apache configuration for running gitlab with passenger
#
# PREREQUISITES
#
# you need to install the passenger gem
#
# > sudo gem install passenger
#
# build and install the passenger apache module (most requirements are covered during gitlab installation)
#
# > sudo passenger-install-apache2-module
#
# The install script will prompt you with missing dependencies, and especially how you should update your
# apache config. If you are using debian (or a debian-like apache installation) i strongly suggest
# putting these in /etc/apache2/mods-available/passenger.{load,conf} and use a2enmod to set it up in your
# server:
#
# > sudo a2enmod passenger
#
# update the values between %% in the following file, and everything should be working fine ...
#
# et voilà ...
<VirtualHost *:443>
ServerName gitlab.%YOUR_DOMAIN%
ServerAlias gitlab
ServerAdmin gitmaster@%YOUR_DOMAIN%

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the gitmaster user coming from?


DocumentRoot /home/gitlab/gitlab/public

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't gitlab located in /home/git?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if you see this was submitted a year ago when there were 2 users :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i'm aware, but still needs fixing before its mergeable :)



LogLevel warn
ErrorLog /var/log/httpd/09-gitlab-error.log
CustomLog /var/log/httpd/09-gitlab-access.log combined

ServerSignature On

SSLEngine on
SSLCertificateFile %PATH TO A PROPER CERT%

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the user does not have a SSL certificate?

SSLCertificateKeyFile %PATH TO A PROPER KEY%

<Directory /home/gitlab/gitlab/public>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the location

# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName gitlab.%YOUR_DOMAIN%
ServerAlias gitlab
ServerAdmin gitmaster@%YOUR_DOMAIN%

DocumentRoot /home/gitlab/gitlab/public

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the location

Redirect permanent / https://gitlab.%YOUR_DOMAIN%/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we can assume people are running SSL

</VirtualHost>