Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
    </Proxy>
    ProxyPreserveHost on
    ProxyPass /jenkins http://mydomain.de:8080/jenkins
</VirtualHost>

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

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

mydomain.de/jenkins
mydomain.de:8080
mydomain.de:8080/jenkins

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.

share|improve this question
    
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
    
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
add comment

1 Answer

up vote 1 down vote accepted

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]

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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