virtual host doesn't work on tomcat7 - dns

I have a web running on Tomcat7 (installed on ubuntu 14.10). The application is available at localhost:8080/myapp.
I would like to access it with the url : myapp.com
I've tried many tutorials on the web (update server.xml by adding a , update /etc/hosts file, etc). None of them work.
If you know how I could achieve this, that would be great.
Thanks in advance!

Deploy your web application as a ROOT.war under webapps.
Open your server.xml and change the port from 8080 to 80.
Add below line to your host file.
127.0.0.1 myapp.com
Now try http://myapp.com
Hope this helps!

Related

Remove port from registry URL in Gitlab UI

We’re running Gitlab with docker-compose and have the registry enabled. On our server where the docker container’s running we’re running a NGINX that proxy_pass https://our-registry.com to the port we have exposed the registry on. That works fine and all.
Our problem is that in the Gitlab UI it’s showing the registry URL as https://our-registry.com:5005.
Using the URL with that port will not work. How can we make the UI not show the port? We have already tried setting the registry_external_url to https://our-registry.com but without success.
Thanks in advance!
Removing the config below from gitlab.rb worked for me.
gitlab_rails['registry_port'] = "5005"

access a project link on ubuntu machine without port number

I have a project running on ubuntu (installed on vm machine(ipaddress-172.22.240.54) on server ), jboss server port 8180
I need to access that link via http://172.22.240.54/employeeConnect/rest(without mentioning port number)
What changes are required in httpd file and server.xml file?
You will need to add the following to your httpd.conf
ProxyPass /employeeConnect/rest http://localhost:8180/employeeConnect/rest
ProxyPassReverse /employeeConnect/rest http://localhost:8180/employeeConnect/rest

Accessing remote linux server's localhost:8080 from windows desktop

I am a complete beginner with Linux. I have ssh access (I think that's what it is) to a linux server. I have a program called SpagoBI installed on the server, and it needs to be accessed through localhost:8080 in a browser. I have changed the xml file that points to localhost to the ip of the server but I still can't access it. Does anyone have any suggestions on how to access the localhost through the ip?
With SpagoBI configured to answer on localhost (the default), you can use Putty on Windows create an SSH tunnel from your local system to the SpagoBI system. If you were to redirect local 8080 (of your local system) to 8080 of the SpagoBI system, then you could access the remote SpagoBI server like this http://localhost:8080/SpagoBI while the SSH tunnel is up.
Now... to configure the SpagoBI server correctly so that it answers on a specific FQDNS... you'll need to modify the Tomcat server.xml
Go to the Tomcat config directory and edit server.xml. These are two entries you'll need to modify. Then restart tomcat and try to access SpagoBI using the FQDNS and URL.
<Environment name="spagobi_service_url" type="java.lang.String" value="http://spagobi.example.com:8080/SpagoBI"/>
<Environment name="spagobi_host_url" type="java.lang.String" value="http://spagobi.example.com:8080"/>
After restart, try accessing SpagoBI like http://spagobi.example.com:8080/SpagoBI
I hope I understood. Do you write "localhost:8080" on your remote windows machine? If so, you should write the SpagoBI's address instead of localhost.
If you already doing so, I see on SpagoBI troubleshooting that you should try with http://serverIP:8080/SpagoBI/servlet/AdapterHTTP?PAGE=LoginPage&NEW_SESSION=TRUE.
I would check that 8080 port is open on firewall anyway.
If you have access to the GUI on server I would try to open in a browser that http://localhost:8080 is actually working at least locally.
Check whether the spagoBI is working in linux server or not. If not follow these steps: http://www.2daygeek.com/spagobi-5-0-release-notes-installation-steps/
If it's working in linux server, it can be opened in you windows system with the url:http://ipaddress of linux server:portnumber/SpagoBI.

How to check jboss running in redhat environment?

I have installed jboss-eap-6.2.0 in redhat environment and started the server.But i'm not able to access the home page via http://<>:8080 .Here i have to access home using ip address or name like http://<>:8080 its getting time out. So i would like to know what is the problem here and why not to see the jboss home here ?
1.Is there any way to check the server running in putty command line ?
2.Able to install the software connecting via ip but same ip is not allowing to access jboss page .So is firewall blocking the port 8080 ?
Please advise
Open the standalone.xml file from the JBOSS_HOME/standalone/configuration directory.
Look for all the texts jboss.bind.address in there and change the ip with the server's IP address so that you can access it from your local pc.
For example
${jboss.bind.address:192.168.1.68}
${jboss.bind.address.management:192.168.1.68}
... and so on...
Also, you can look for the loop back ip address(127.0.0.1) in the xml file as well and replace it.
Even i faced same issue wheni installed jboss7 on centos machine.i found that 8080 port was being used by some other app,thus disabling jboss7 to use that port.
-you can
telnet localhost 8080 (or) ps -ef|grep java
to check if jboss is running
if its running properly and you still not able to connect through your browser
use nmap to check services running on that port
you can edit your port configuration at
jboss/standalone/configuration/standalone.xml
run jboss again
You need to set the value of the default interface in socket-binding as well in your standalone.xml.

Deploying WAR file in Amazon AWS - Tomcat and Apache HTTP Server conflict

I'm using an Amazon Linux AMI instance and I've deployed a war file on it.
The deployed war file shows up in the 'webapps' folder of tomcat6.
The real problem is - Apache HTTP 2.2 server is also installed.
When I access my instance's URL (http://ec2-107-20-92-32.compute-1.amazonaws.com), I see the default page of Apache HTTP 2.2 Only, which, if I'm not wrong, works on port number 80.
Now, how do I get my Apache HTTP 2.2 Server communicate with tomcat6 to display the website deployed in Tomcat?
Or, are there any other alternatives to it?
(I use MacOS X's terminal to connect to my Instance and I uploaded the WAR on S3 to deploy it in tomcat.)
TIA :)
In addition to mac's suggestions (shutting down Apache and making Tomcat listen at port 80, or configuring the Tomcat connector on Apache), you might also set a pair of ProxyPass/ProxyPassReverse directives on your Apache configuration, like the example at mod_proxy documentation.
If you decide to follow this suggestion, your rules would look like follows (in the VirtualHost listening at port 80):
ProxyPass / http://ec2-107-20-92-32.compute-1.amazonaws.com:8080/
ProxyPassReverse / http://ec2-107-20-92-32.compute-1.amazonaws.com:8080/
Nothing worked.
I deleted the instance and tried the same with Ubuntu 12.04 64 bit instance, it worked.
I have no clue why it didnt work in Amazon Linux AMI :(

Resources