Using Xampp on my Windows Server I recently installed some web apps using tomcat. Using the Apache to access phpMyAdmin. After deploying I noticed I access the tomcat webapp using a URL like this: domain.com:8080/someapp/.
I do not like that but the internet says its good for some security reasons so I did not change the port from 8080 to 80 in the server.xml.
But I want the end-user not to access my app using :8080 in the URL.
How can I redirect my Apache to Tomcat witgout losing my access to phpMyAdmin?
Related
We have windows based XAMPP webserver which has built-in tomcat server. I have deployed an app on tomcat and having issue while mapping url to application.
Xampp (80,443) and tomcat (9091,9093) are running on different ports. I have configured server.xml but when I am trying to access mapped url, its not reachable. I checked in network tab on browser inspector it is trying to reach on server's port 80.
Below is configuration part from server.xml
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
I have a new Ubuntu server, on the old server (12.something) we had api.mysite.com and portal.mysite.com running. We have since moved portal.mysite.com to the new server but now I am stuck getting the api to work.
I have the ip of api.mysite.com in my local windows 7 hosts file set to the ip of portal.mysite.com and it is my understanding that if I go to api.mysite.com(on my machine with the fudged ip in the hosts file) it will go to the new server but the header for my request will identify to apache that I want to go to api and not portal.
I am pretty sure that I am hitting portal - the config file on portal is set to redirect / to https://portal.mysite.com and that is not how I know - it is because there is a ServerAlias on portal that is portal.prod.mysite.com and if I go to api.mysite.com I end up at https://api.prod.mysite.com/
portal currently redirects to https and when I am done I want api to redirect to https as well. Portal has been running fine on the new server for a few weeks no.
What am I doing wrong? I need portal and api to run on the same server.
Thank you
API:
And portal:
I am trying to setup a gitlab repository and I am quite new to the web server side of things. My setup is the following:
I have an apache server which is running my main website on port 8080.
I have the gitlab configured with SSL and Nginx and running on port 2443.
At the moment, the gitlab site can be accessed through https://www.example.com:2443.
What I would like to do is setup a redirect through my apache server where if someone comes to http://www.example.com/gitlab or https://www.example.com/gitlab, they get redirected to ``https://www.example.com:2443` (preferably without the web browser text field changing).
Could this be done easily with Apache? Also, since the redirect is to an SSL site, any special things we need to consider?
You can try adding the redirect directive to your Apache VirtualHosts (8080 and 443).
Redirect permanent /gitlab https://www.example.com:2443
I have Apache tomcat 7 where I build my web application and I also have Apache Web Server where my web site exist wrote on Css and HTML. I want to inject my web app on web site. How can I make my Tomcat as web server and container and transfer web site from Apache WebServer to Tomcat. ???
I know tomcat also can work on 80 port. Just I use to read documentation how to integrate Apache WebServer with Tomcat using mod_jk ajp connectors and etc to do, seems like it doesn't work.
If you want to use Tomcat as your web server (to serve your .html and .css files and probably images), then you can just get rid of the Apache Web Server; you no longer need it, according to your question. Then, after putting all your html/css/etc. under webapps/[app-root]/, make sure that all references to port 8080 in Tomcat's conf/server.xml are changed to port 80, reboot Tomcat, and you'll be good to go.