LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-19-2015, 04:44 PM   #1
sndlt
Member
 
Registered: Jun 2014
Posts: 55

Rep: Reputation: Disabled
Jenkins behind SSL, my case not going through


I used to use these statemets to put Jenkins behind reverse proxy for TLS in previous previous job. But somehow these are't working anymore.

I referred to all the Jenkins proxy guides on here and and Jenkisn website, but no luck. They all seem to have variations of what I already have/know down in conf files.

So basically, I installed Jenkins and can access via http://its-address:8080; Now I'm triyng to put it reverse proxy through http:its-address so that I can reverse proxy it to https://its-address

I used to able to get through without using a2enmod.

These are what I used to add on httpd.conf and ssl.conf.

[httpd.conf]

Code:
<VirtualHost *:80>
DocumentRoot /var/www/html
ProxyPass / http://localhost:8080 / nocanon
ProxyPassReverse / http://localhost:8080/
ProxyRequests Off
ProxyPreserveHost On
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
[ssl.conf]

Code:
SSLProxyEngine On
ProxyPreserveHost on
ProxyPass / https://localhost:8080
ProxyPassReverse / https://localhost:8080
No matter what I do around syntax, I'm suffering from

Code:
httpd[2410]: AH00526: Syntax error on line 100 of /etc/httpd/conf/httpd.conf:
httpd[2410]: ProxyPass|ProxyPassMatch needs a path when not defined in a location
or
httpd[2401]: Invalid ProxyPass|ProxyPassMatch parameter. Parameter must be in t...lue'.
Am I putting the correct statements?

Seems like I'm not even puting it behind 80 to be able to forward to 443. 443 is currently configured with CA signed keys and the test page is secured.

Help appreciated, thanks.
 
Old 07-20-2015, 03:39 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You have an error in your ProxyPass definition. The slash "/" has to be right after the port definition and not on its own:
Code:
<snip
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
<snip>
Also you have to add trailing slashes in the ssl vhost:
Code:
SSLProxyEngine On
ProxyPreserveHost on
ProxyPass / https://localhost:8080/
ProxyPassReverse / https://localhost:8080/
 
Old 07-20-2015, 09:10 AM   #3
sndlt
Member
 
Registered: Jun 2014
Posts: 55

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

You have an error in your ProxyPass definition. The slash "/" has to be right after the port definition and not on its own:
Code:
<snip
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
<snip>
Also you have to add trailing slashes in the ssl vhost:
Code:
SSLProxyEngine On
ProxyPreserveHost on
ProxyPass / https://localhost:8080/
ProxyPassReverse / https://localhost:8080/
Thanks for your time.
I'm getting "Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later" at the webpage.

I added what you recommended to both httpd.conf and ssl.conf.

[httpd.conf]

Code:
#  ReWriteCond %{SERVER_PORT} !^443$
#  RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
# </VirtualHost>

<VirtualHost *:80>
DocumentRoot /var/www/html
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
ProxyRequests Off
ProxyPreserveHost On
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>



#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost
[ssl.conf]

Code:
 

SSLCertificateChainFile /etc/pki/tls/certs/DigiCertCA.crt

#   Certificate Authority (CA):
#   Set the CA certificate verification path where to find CA
#   certificates for client authentication or alternatively one
#   huge file containing all of them (file must be PEM encoded)
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt


SSLProxyEngine On
ProxyPreserveHost on
ProxyPass / https://localhost:8080/
ProxyPassReverse / https://localhost:8080/


#   Client Authentication (Type):
#   Client certificate verification t

Thanks again.
 
Old 07-20-2015, 09:33 AM   #4
sndlt
Member
 
Registered: Jun 2014
Posts: 55

Original Poster
Rep: Reputation: Disabled
Also,

[/etc/sysconfig/jenkins]

Code:
JENKINS_PORT="8080"
JENKINS_LISTEN_ADDRESS="0.0.0.0"
JENKINS_HTTPS_PORT="8081"
JENKINS_HTTPS_LISTEN_ADDRESS="0.0.0.0"
 
Old 07-20-2015, 12:13 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I'm getting "Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later" at the webpage.
I don't know how jenkins works, but you should make sure that the backend server is running and listening on 127.0.0.1:8080
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to install jenkins in slackware14.1 64 the_zone Slackware 2 06-16-2015 01:58 PM
Jenkins with Vagrant issue sathya_css Linux - Server 0 05-07-2015 05:44 PM
Jenkins + Redmine seprob Linux - Software 4 03-25-2015 02:48 AM
Where did the Jenkins in Jenkins CI come from? vmccord General 2 10-13-2014 02:10 PM
LXer: Continuous Deployment With Jenkins And Rex LXer Syndicated Linux News 0 09-21-2011 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration