I've been using XAMP and it's features for some php sites and it's working fine. I'm now needing to use it for JSP development for a project we're about to start working on.
So far it's functioning on my local machine in that I downloaded the sample war file from Tomcat and it deploys fine and is visible when using localhost:8080/sample.
The problem is that I can't seem to access it from a browser using the domain name. I tried www.mydomain.com/sample but receive a 404 error.
The same when using my local IP address instead.
I've searched online for a while now and have come across a few sources that hint at integrating apache with tomcat but nothing concrete enough to try and get a working solution.
I've also tried (and miserably failed) to watch the video that is referenced in a few other questions.
Any help is hugely appreciated,
Thanks.
that's because tomcat works on port 8080 unlike apache - when you run php sites they are just behind the apache which is visible on port 80 (which the default one in browsers), you can go through "http://mydomain.com:8080/sample" and it would work the same as through localhost
you can also change tomcat's settings and change it's connector's port from 8080 to 80, and then it would work as you expected
Related
I am a total newb at this and I want to learn. I have a webapp running in a docker container currently on Ubuntu 16.04TLS. I can connect to it over the Internet and it works fine. I want to run an Apache frontend in a separate container and enable SSL. I worked on this for 8 hours today and I know I was close. I had to restore the VM in the end so i could put the webapp back online.
I followed this tutorial https://medium.com/#jmarhee/running-multiple-web-applications-on-a-docker-host-with-apache-85f673f02803 and was successful at being able to connect to Apache (I got the default home page with the install) but was unable to get Apache to proxy for Tomcat. I got a 503 error when I enabled the proxy pass through. I am all about reading if you folks are good with pointing me in the right direction. Since I want to learn, I may come back with more questions. I did read another article http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach but I did not understand how to apply it to my situation.
TIA for any help you can provide me with.
Based on samples found in the net, I developped a GWT webapp....that works fine (so far) when it is started in superdevmode from eclipse (through Jetty).
A browser can access my webpage from local/remote computer (bindaddress=0.0.0.0).
Issues appear when trying to deploy it with TomCat. Indeed, the webpage is accessible, but at some point, there is a redirection to port 9786. I guess this is a normal situation since it is built in superdevmode? If I set the development mode in Eclipse to Classic mode, it doesn't even work in Eclipse.
I thought having a web server listening on port 9786 is not a proper implementation. So, I am trying to get rid of this port (probably a matter of dev mode).
What should I do?
I have created a website running on eclipse and tomcat. What is the way to make this website running online for real?? I have developed it, adding filters and sessions and using a database. I want to allow people to use this website. What I have to do?
You need to publically expose your computer and the port you set up.
If your application runs locally, it must be able to be hit by the outside world.
Make sure the tomcat config is setup correctly and ensure port forwarding on your router or modem is setup. Your public IP (available if you google whats my ip) and the port is all your users would need.
We are having issues with our deployment. We need to deploy to a remote TomCat-container which is accessed through IIS 8.5 with the TomCat Connector from Apache. We followed the guide at the following resources when we installed the connector:
https://confluence.atlassian.com/pages/viewpage.action?pageId=376210448#ConfiguringTomcat-ConnectorforIIS8.0(WindowsServer2012orWindows8)-Step1.InstallandConfiguretheAJPConnector
File size is not too big for IIS 8.5 (the file size is 50mb)
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
Of what we can see, the .war file gets uploaded but when it should be deployed, we are returned a 404 page, telling us that the page doesnt exist and the application is not deployed.
Things we have checked and double checked is the configuration for:
File size limits in TomCat configuration (the file is not too big for TomCat)
Security Access for the TomCat service user (NETWORK SERVICES), so that TomCat has access to the folders it needs for unpacking the .war etc.
Alot of other things while we were grasping for some answer
The logs of TomCat and IIS doesnt give a clue to why this issue exists, we can see that we accessed the manager and performed a PUT operation, nothing else... we have set the log level to FINE, still no clue. Logs of IIS does also not give any clues to what the issue is.
We are thinking that the issue lies within IIS 8.5 and the connector but we cant find it.
Thankful for anything that you might think could be a potential issue. Are there any other connectors for TomCat 7.0.55 / IIS 8.5 that might be better?
Thanks / David
Hmm, the issue was really related to max upload-sizes in IIS 8.5
We read in the documentation that IIS 8.5 has 2gb as upload limits but as I posted the question above I thought that I just had to double check it. It was set to 30mb... Its always some trivial answer... Im leaving this here in case someone else gets the same issue
Had the same problem, deploying from maven using tomcat plugin was returning 404 ([ERROR] Tomcat return http status error: 404, Reason Phrase: Not Found).
Indeed, the problem was the "Maximum allowed content length", that was ~30MB.
This value can by changed on: The site > Request Filtering > [Actions Panel] > Edit Feature Settings.
I'm sharing because almost 3 years have passed and this question brought some light to my problem
Hey guys i'm having a bit of a problem with the setup i'm trying to get to.
I've got tomcat running on 8080 and apache2 running on 80, and i'm a bit lost as to how i can get apache to forward to tomcat for specific files. I'm setting up webgoat as a link on my apache homepage
EX:
127.0.0.1 -> Goes to homepage
Homepage has links to webgoat at 127.0.0.1:8080/WebGoat/attack
I'm trying to set this up as a home pen test server for myself, i want to trying to add as much capability and since having php work with tomcat is a bit ... Out of wack, i'd rather have php running with apache2 and then just link to tomcat for my java type files.
Thanks.
EDIT: Yes i have looked at the other questions on here from before and it seems like they aren't pertaining to the same thing i am. And the ones that did were very old.
Create a .htaccess file on your apache and add:
# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://example.com:8080/newdirectory/newfile.html