vlead / continuous-integration

This repository talks about implementation of continuous-integration project
Other
0 stars 1 forks source link

Run jenkins server application on 80 port #6

Closed ksripathi closed 7 years ago

ksripathi commented 7 years ago

By default jenkin server runs on 8080 port. Since vlead-cluster doesn't allow requests from 8080 port we should make it running on 80 port

psrikar97 commented 7 years ago

Used different methods to try and resolve this issue, there were a lot of errors. I change the HTML_PORT in the Jenkins file on a different sample container which was setup for this, when the ip-add was opened in browser with port 80, it still ran the apache page. I purged apache and went through the whole process again and this time it says that the connection failed.

sivashankerN commented 7 years ago

To run your jenkins server on port 80, Install mod_proxy in Jenkin server. Using proxy_pass directive of apache/httpd( web server), you can run Jenkins on 80 port.

web server accepts 80 requests from browser( client requests), forwards these requests to ProxyPass ProxyPass then forwards to 8080 port.

ProxyPass sample example

ProxyPass / http://localhost:8080/

This way you can try .

For more details https://httpd.apache.org/docs/2.4/mod/mod_proxy.html

psrikar97 commented 7 years ago

Install it in the Jenkins file? Or install it on the container in the base4 server?

ksripathi commented 7 years ago

Thank you @sivashankerN

I resolved it by adding LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_ht <VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ServerName myhost.com ServerAlias www.myhost.com ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ `