Setting up a Web Server (with Apache, PHP, Git, Redmine, etc.)

From XennisWiki
Jump to: navigation, search

Get server

DigitalOcean offers for example a cheap cloud server. It just takes some minutes to setup for example an Ubuntu server.

Create User

Create a new user

useradd myUser

Optional give user admin rights

adduser myUser sudo

Optional you can create and/or copy an SSH key for the created user to use the key instead of a password for login.

Install Components

Web Server

Apache HTTP Server

More informations: Apache HTTP Server

Install Apache web server (a possible alternative is e.g. nginx)

sudo apt-get install apache2

If your browse to your server, you should see a It works HTML side. This file you find in /var/www/index.html.


More informations: [Nginx]]

Install nginx web server (a possible alternative to Apache)

sudo apt-get install nginx

Setup nginx

  • Add to /etc/nginx/nginx.conf file:
http {
    server {
        listen      80;
        server_name SERVER-IPM
        root        /var/nginx;
  • Create directory /var/nginx/ and put in there a index.html file.
  • Start server
sudo nginx

When now navigate with a browser to you server, you should see the content of the index.html

Programming language

PHP (server-side scripting language)

More informations: PHP

Install PHP 5 as scripting language

sudo apt-get install php5


More information: Ruby

sudo apt-get install ruby

MySQL (relational database management system)

see MySQL


see phpMyAdmin

Git (revision control and source code management)

More information: Git

sudo apt-get install git

gitolite (Git server)

see gitolite

Gitweb (Git web interface)

It is recommended to fellow the installation instruction in the tutorial.

sudo apt-get install highlight gitweb

Redmine (project management tool)

More Informations: Official site

Fellow the tutorial HowTo Install Redmine on Ubuntu step by step to install Redmine.


Install the text editor vim

sudo apt-get install vim

See also

External links