SSL certificates for apache

Simple way to create self-signed SSL certificates.


Apache2 with Git Smart HTTP

Install git-core and apache2. Also make sure required modules are loaded:

To create a git server with smart protocol, I used the following script in /var/gitwww:

And I configured my default virtualhost as following:

After that restart your apache and create a master branch from your client:


Bug in htpasswd.exe

I tried to configure basic authentication under an apache 2.4.4 and could not find out why my password didn’t match. Just got the following line in the log though my password was correct:

[…] [auth_basic:error] [pid …:tid …] [client ::…] AH01617: user ___: authentication failure for “/asd/”: Password Mismatch, referer: http://localhost/

So I found the following bug description To come over this I just had to use httpasswd with the -b flag to provide the password from command line instead of prompting for it.

apache2: Could not reliably determine the server’s fully qualified domain name, using for ServerName

on local webservers without specific domain I often came over the stated apache warning. Here is how to get rid of it:

  • Check your /etc/hosts that there are entries for localhost, localhost.domainname, hostname, hostname.domainname.
  • Last edit /etc/apache2/httpd.conf and add ServerName hostname to the file.
  • Restart apache

Nexus server behind an apache2 proxy

the following howto explains how to install a default nexus server behind an apache2 proxy on a debian host.

First install apache and java download nexus and prepare for configuration. You’ll find the latest version of nexus under

[codesyntax lang=”bash”]


Change root path of the nexus web application in /usr/local/nexus/conf/ from /nexus to /

[codesyntax lang=”bash”]


Then add a new vhost to apache:

[codesyntax lang=”apache”]


Apache needs some additional modules loaded and nexus has to be started too.

[codesyntax lang=”bash”]


After this you should be able to access the nexus server via http://nexus-host:8081/ and http://nexus-host/. The first one is the webapp behind the proxy. Of course you have to replace the hostname or create an appropriate /etc/hosts entry.

As described, this setup is a nexus only host without NameVirtualHost configuration. You can add ServerName and ServerAlias if you want to be able to deploy other vhosts. If you want to share the vhost with other applications, just skip the part with changes in the file or change the value to the wanted path. Then you have to use different lines for proxy configuration. For example, if you want too keep /nexus, you have to use

[codesyntax lang=”bash”]