I installed Jenkins on a remote server running Debian 6.0.6 with a ready-to-use Apache 2 instance by using the following instructions:

wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
apt-get update
apt-get install jenkins

Then I did some configuration:

a2enmod proxy
a2enmod proxy_http
a2enmod vhost_alias 

I created the file /etc/apache2/sites-available/jenkins:

<VirtualHost *:80>
    ServerName mydomain.de/jenkins
    <Proxy *>
        Order deny,allow
        Allow from all
    ProxyPreserveHost on
    ProxyPass /jenkins http://mydomain.de:8080/jenkins

And finally restarted Apache with /etc/init.d/apache2 restart.

Now I cannot reach it via Webbrowser. Neither of the following lines works:


Using the first address triggers the following error message in /var/log/apache2/error.log:

File does not exist: /var/www/main/jenkins

EDIT: I just found out that starting the browser on the remote server I can access Jenkins by visiting http://localhost:8080. So Jenkins works, only the redirection is still erroneous.

  • 1
    I don't think you can use ServerName mydomain.de/jenkins maybe set it up as jenkins.mydomain.de with the proper DNS entry.. – NickW May 10 '13 at 10:04
  • Well I used a guide for hudson like another guy in this forum did. – Bastian May 10 '13 at 10:31
  • You didn't read it very well, nowhere in that hudson guide does it say to put a ServerName directive like you have used. Get rid of the /jenkins at the end, just type it in yourself in the browser. – NickW May 10 '13 at 10:36
  • Thank you, you were right! Actually I used serveral guides which is why the configuration got mixed up a bit. Do you know where to start if I want to use jenkins.mydomain.de? – Bastian May 10 '13 at 12:00
  • 1
    Well, first set up a DNS entry, an A record under yourdomain.de, then use the proxypass directive like this ProxyPass / http://mydomain.de:8080/jenkins or something similar. – NickW May 10 '13 at 13:06

ServerName Directive

Description: Hostname and port that the server uses to identify itself
Syntax: ServerName [scheme://]fully-qualified-domain-name[:port]
Context: server config, virtual host Status: Core Module: core

You do not need, in fact cannot use, a directory as part of a FQDN.

From Wikipedia:

A fully qualified domain name (FQDN), sometimes also referred as an absolute domain name,[1] is a domain name that specifies its exact location in the tree hierarchy of the Domain Name System (DNS). It specifies all domain levels, including the top-level domain and the root zone.[2]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.