Is Apache web server required for jenkins installation - apache

Is it necessary for jenkins, that we need to install apache web server even if we have tomcat installed. ?

From - https://jenkins.io/doc/book/installing/
Jenkins is typically run as a standalone application in its own process with the built-in Java servlet container/application server (Jetty).
Jenkins can also be run as a servlet in different Java servlet containers such as Apache Tomcat or GlassFish.
So you can use Jenkins "as-is" or use with Tomcat.

No. Apache Tomcat can handle HTTP and HTTPS requests on its own as configured in server.xml
Default HTTP Port is 8080 -> default local URL: http://localhost:8080/jenkins
Default HTTPS Port is 8443 -> default local URL: https://localhost:8443/jenkins

Related

SSL Apache HTTPD to SSL Weblogic Managed Servers Call

I want to setup SSL Apache HTTPD -> SSL Weblogic Managed Server.
While opening UI via https Apache HTTPD, getting backend server not available.
Note :
I have ssl module and related modules enabled on httpd end. Weblogic Managed Server SSL is also working because we deployed a middleware component and able to fetch the data from postman/soap UI/curl using https Weblogic Managed server IP and port with API of middleware.
I am able to implement SSL Apache HTTPD -> Non SSL Weblogic Managed Server and can able to open UI with https Apache HTTPD.

unable to configure tomcat 8.5.57 webserver for https on ubuntu 18.04

I have installed tomcat on ubuntu 18.4. post default installation and jave home configurations able to see webserver page as response for http://:8080.
Later generated keystore and updated the details in conf/server.xml to enable https. Even after this am not getting tomcat default page with https, though getting web page over http / 8080 port.
Any pointer to debug / enable https on tomcat.?
Is Apache tomcat version 8.5 compatible with Ubuntu 18.04 version.?
After reviewing the server.xml, connector node for https was made with smaller case. was not aware of it as case sensitive. after making appropriate changes able to access https also.

Running two copies of Apache web server on same server for two different applications

I've created another instance of Tomcat(port: 81) to run a different application in a server. Tomcat is running successfully but I want to run apache web server on top of it. So, I copied existing apache in another folder and configured to the another instance of tomcat. I'm facing below error. Your help will be greatly appreciated.
enter image description here
It would appear that both instances are configured to also listen for https connections on the default port (443), i.e. while you may have configured them to listen on different http ports (i.e. 80 and 81), you haven't done the same for https.
First, something else is already using that 443 port, so try 8443.
Also, technically, you can install Tomcat twice using different service names, but why. The beauty of Tomcat is using one installation for multiple applications.
Tomcat is intended to support multiple apps. With a .war file you simply upload your .war file to web apps folder. Tomcat will automatically extract the war file.
To run app as ROOT application, delete the ROOT folder in Tomcat. Rename the .war file for the app you want to install to ROOT.war, it will extract to ROOT folder and you will access it from http://servername:8080, if you kept the default settings of the tomcat connector.
Now, to add a second application, copy a .war file to Tomcat webapps folder, with a different name other than ROOT.war, such as example.war. It will automatically extract the .war file into an example folder. To access that application, go to http://servername:8080/example. You will not have two Tomcat connectors for port 8080, just the 1, and you will access non-ROOT webapps via a context path.
Option 1:
If you want to use TLS in Tomcat, you need to uncomment the 8443 connector in Server.xml. You also need to create a keystore, and put in that keystore information in Server.xml to allow TLS.
Option 2(Doesn’t work with option 1, unless you pick a different port):
If you want a web server with TLS, then set Apache Web Server to listen on 8443, which will also require creating a key store and virtual host file in Apache Tomcat, but leave the Tomcat port at 8080 as it normally would be. Then use virtual host settings on Apache Web Server to proxy to the Tomcat apps (jumping from 8443 to the 8080 ports on the same host with Tomcat only listening on 127.0.0.1 or different hosts with proper network separation so people can’t get around the Web Server). Apache2 would be listening at the Web
Server FQDN.
Example:
Skip the Apache Web Server, and use different context path settings (as needed) for each tomcat application on the single 8443 port. (Make sure Apache2 is no longer using 8443).
ROOT app:
User—>https://servername:8443
App2:
User—>https://servername:8443/app2
Using Apache Web Server, you would proxy from port 8443 to 8080. Apache Web Server listening on 8443, Tomcat listening on 8080. TLS encryption would be at the Web Server. The connection between the Apache2 and Tomcat would be unencrypted on the same server.
This is a pretty thorough example of reverse proxy:
https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension
User—>https://servername:8443–>http://localhost:8080

How to change default 80 port to my tomcat 8080 for my domain name

I am using tomcat on Linux centOs server. I want my java application is working fine on mydomain.com:8080. I want that my when some one hit the domain mydomain.com it automatically move to my java application.
Changin server.xml didm't worked for me. as i am also having apache2 on the server
I guess you have an apache server in port 80. I you do not want to remove apache and change directly the tomcat port ( see comments), you will need to redirect all traffic from port 80 to port 8080.
This can be done using tomcat connectors. They are plugins to connect web servers with Tomcat. When a HTTP request arrives, the plugin checks is it has to be redirected, connects to tomcat and returns the response to server
In the case of apache is needed to install mod_jk. In the link you can see the configuration

302 redirect, Tomcat behind Apache for hybris

I've configured hybris and apache,mod_jk using below blog article.
www.facebook.com/permalink.php?id=317609748375071&story_fbid=680730588729650
hybris is completely running fine on tomcat ports http on 9001 and https on 9002.
one of developer has also configured redirection at hybris level
so any request comes in for http://hot.local:9001/ it gets automatically
redirect to https://hot.local:9002/abc/en.
Now I'm stuck at apache and mod_jk configuration point of view.
I'm not able to setup URL redirection in apache with mod_jk configuration.
Getting below error
[22993:22208] [debug] jk_handler::mod_jk.c
(2047): Service finished with status=302 for worker=tss1
I'm configuring above stuff on UBUNTU.
1) Opened Port 443 exclusively in ubuntu
2) Include redirectPort="8443" in tomcat siemap.xml
3) Include below tag in apache2 ssl config
JkMountCopy On