Can I use Rundeck from its .jar file without DNS configuration? - java

I am trying to use Rundeck from the .jar file. I use a Java command to start it up on my Linux (CentOS) server. From a work station, I open a web browser and go to the IP address of the Linux server over port 4440. After I log into the web UI, the URL changes from an IP address to the host name of the Linux server. The web browser displays "ERR_NAME_NOT_RESOLVED."
My authentication is successful. But I do not have a record on my DNS server for the host name. I will not be able to get the systems administrator to update the DNS server either. I do not have administrator permissions on the workstation with the web browser that I use to connect to the Rundeck server. I therefore cannot update the local hosts file.
Is it possible to use the .jar file for Rundeck without resolution of the host name of the Linux server from the workstations that try to use the web UI of Rundeck? If so, how? I try to re-type in the IP address. But I am unable to get the web UI to work. The IP address keeps changing to the hostname. The hostname never resolves to an IP address.

Modify the rundeck-config.properties file:
grails.serverURL=http://<ip-address>:4440

Related

How to access REST API from a remote machine?

I am writting spring service(rest) for mobile app.I am writing test service with localhost and running on virtual machine(windows) but i can see http://localhost:8080/restonly on the same computer.What should i do to use my rest api from another machine?ip
aplication properties
spring.data.mongodb.host=localhost
spring.data.mongodb.port=
spring.data.mongodb.database=mongoTest
You are talking about two different things.
Your property file is about connection to your mongodb instance.
localhost is only a shortcut "saying" that the application can be found on your local machine.
having localhost in this property file means that the application server and the database server are on the same physical machine.
If you want to access your API from another machine, you can use the IP address of the server.
On Windows, you can know this address by typing ipconfig in a command line.
On Linux, it would be ifconfig.
Later, you can try to work with machine name instead of the IP address.

Change localhost to something like localhost.dev in dynamic web project

I am creating a dynamic web project in java. I want to deploy it in a application server. By default we have hostname as localhost:port/appname. I want to change it to localhost.com/myapp. How can i do that? Do i need to change something in my project or tomcat or hostfile. Please elaborate.
I fear there may be some confusion about how web servers work.
In your browser the URL http://localhost:8080/application_name will resolve internally to 127.0.0.1 (localhost) as this is a built in address. 127.0.0.1 is a loop back address pointing to the machine you're on. If you're hosting the server on the same machine as the you're trying to navigate to this is why the localhost address works.
If you were on another machine you would need to either directly input the IP address of the server or use a DNS record to point the IP address to a URL you own and control.
Browser are also programmed to default to port 80 for http and port 443 for https so if you don't want to have to provide a port have your server bind to port 80. This way you'll only need to navigate to http://localhost/application_name
When deploying the application to a server you want to be externally accessible you'll purchase a domain, register the DNS record and point it at servers external IP address (You may need to configure firewall and network rules).

how to redirect two domains to the same tomcat server in a secure network on windows

My tomcat server is running on amazon. I have 2 different domains(https://app.test.com and https://www.app.testpro.com) which I would like to redirect to the same tomcat server instance
If this is just for testing purposes you can edit your local hosts file to achieve this. If you want to configure a production system then you need to change the DNS records for these domains to point to the IP of your Amazon host.

Can't open web application made with Java EE on other local computers

I am trying to look the web application I made with Java EE. The server and database is up and running. It works on localhost:8080, but when I replace localhost with the local IP address all I get is a 404 error. Do I need to configure something?
On windows 7 open the firewall to allow incoming and outgoing traffic on port 8080. Then from the remote machine make sure that you can ping the server's ip address and then try to browse to the address.

How to host a Java EE website on GlassFish?

I have already deployed my web application on GlassFish at http://localhost:8080/Elibrary/.
So how can I configure my server to make "Elibrary" accessible from the Internet?
I know that in ASP we can use IIS to alias the from domain.
Could someone please let me know or point me to some documentation?
If you are hosting in your network, then you have to get IP of the machine which is running your app i.e. is your local ip inside ur network. To get your ip, run ifconfig on mac/unix/linux and ipconfig on windows.
Then go to your router settings. Generally every router has specific ip to access settings from browser like belkin has 'http://192.168.2.1'.
In your router settings you have to look for 'virtual servers', 'port forwarding' etc. The actual concept is port forwarding but different routers say it differently in the settings. These settings should be in firewall or security sections.
Once you found the settings, there you will have to tell the inbound port range and map it to the local ip (which we have above) and the outbound port range. It is saying that when ever a request comes on the router on the inbound port range then forward that request to local ip and port range. In your case, the port range will be to (for both inbound and outbound). Note that some routers dont have range for ports instead only have one port per entry, so you just have to put .
NOTE: To get the IP for settings of your router, try this site.
I hope this is what you looking for.
Nginx or Apache will work will in that scenario, processing virtual hosts and forwarding to an external application. Example for nginx.
Put this in place of the server section in an existing config file, unless using Debian/Ubuntu or other system where the server configurations are split into their own files.
server {
listen ip:80;
server_name virtualhostname.tld;
location "/" {
proxy_pass http://localhost:8080/;
};
};
Now http://virtualhostname.tld/Elibrary will work to access your application.
You can add rewiriting to get rid of Elibrary, and you find Apache equivalents of this online.

Categories

Resources