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

On my staging server, I have Varnish + Nginx. They are on port 80 and 8080.

Given that I have to install jenkins, on which port I have to bind it ? (which is usually 8080 but it's already taken)

share|improve this question

4 Answers 4

up vote 8 down vote accepted

Configure it to run on any port you like! 81. 8081. Anything really.

share|improve this answer
    
Oh great, didn't know we could change besides 80 and 8080 ;-) –  Tristan Aug 10 at 9:59
    
Well, it seems that Java can't access to port 8081 ... :'( gist.github.com/tristanbes/8580f379c1ec4ef42894 –  Tristan Aug 10 at 10:19
    
I suggest you post a question with detail on exactly what you're trying to achieve, what you've tried and researched to try and get it to work, and any error messages too. –  Drew Khoury Aug 10 at 10:21

Considering that Jenkins normally should not be run as root, you can take anything starting from 1024 upwards, because <1024 is reserved for root only.

share|improve this answer
    
I think you meant anything above 1023. I can bind to port 1024 as an unprivileged user, but not 1023. –  nyuszika7h Aug 10 at 13:32
    
Of course you are right. –  Marc Stürmer Aug 10 at 16:38
    
It's always an off-by-one error :) –  sapi Aug 11 at 7:11

I'd probably put it on port 9000, then use Nginx as a reverse proxy to map Jenkins.yourdomain.com to port 9000.

That way you'll get the bonus of being able to let Nginx do SSL too!

share|improve this answer
    
Yeah, that was the plan (without the ssl though) ;-) –  Tristan Aug 11 at 8:06
    
Y U NO SSL?...! –  Tom O'Connor Aug 14 at 10:48
1  
I like to live dangerously ;-) –  Tristan Aug 14 at 13:05

As @Drew correctly pointed out, you can pick any port that isn't already used.
However, it is common for Web servers and such (including Web interfaces) to listen on ports 80, 8000 or 8080. If you're setting up a Web interface, as I suspect (I don't know of Jenkins, but I see it listens on port 8080 by default), you might prefer port 8000. There's no real advantage; it's just a common practice.

share|improve this answer

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.