Jboss 5 listen on different ip addresses based on different URL path - jboss5.x

We want to harden our Jboss server. We have a web application, and there are two types of resources in this web app
'https://myserver:8443/myapp/local/'
'https://myserver:8443/myapp/intranet/'
We only want the /myapp/local to be able to accessed from localhost 127.0.0.1 and the /myapp/intranet/ can be access from another address from internal network e.g. 192.168.12.12. Is there any way we can configure this? Thanks!
Tony

I found the answer myself. Hope this is helpful for someone who runs into this someday. Here is the solution
https://community.jboss.org/wiki/LimitAccessToCertainClients

Related

Jupyterhub multiple web applications port problem

at my firm we have a jupyterhub/lab installed and is used by roughly 70-100 people in a secure network that can only be accessed to from work. Recently the idea of hosting web-applications for short time use came up, but we are having port problems. User A is running a web application on port 5000, and User B can’t use the port because it is already in use. Port 5000 is default, it can be changed but this is not the behavior we want. Does anyone know of a way for web-applications to run on the same port in the same environment? Have looked into server-proxy but i do not really understand it. Is the way to achieve this really to be running a vm for each user securing that the port is not in use?
Any help is appreciated

How to make local running yii2 CRUD application available online?

I have developed Yii2 CRUD application using models, controllers and views. It is used locally on PC. I wanted the users to use it online.
For eg. I have www.example.com and I wanted to make this yii2 CRUD application available on this site. What are the steps?
Your question is not very specific, therefore you haven't received an answer. I'm assuming you are asking about how to use your local PC as the server for an online site. Otherwise please clarify your question.
You will need to do the following steps:
Point the domain name to the public IP address behind which your local PC is sitting. You can find that by going here: http://whatismyipaddress.com/
In your router you need to set up port forwarding (NAT rules) for port 80 (or 443 if using https) to your computer's local IP address.
Depending on your Apache configuration (or whatever webserver you are using) you need to ensure it serves the right website. This is too broad a subject that I can give you any details here.
Note that you are now opening up your local computer to the Internet and hence you should be aware of the security implications it has.

Redirect/rewrite to different internal IIS sites using query string

EDIT: Ugh I forgot to put this on Server Fault...
I have an Azure VM that is hosting a web application.
The application will be accessible via the VM's IP address:
http://191.238.112.62
I want to be able to use query strings to redirect to completely different sites that are within the local IIS. For example:
http://191.238.112.62/?site=1
would redirect to
www.site1.com
The way I have structured IIS can be seen below:
Each site has an entry in the systems host file.
127.0.0.1 wwww.site1.com
127.0.0.1 wwww.site2.com
127.0.0.1 wwww.site3.com
There is likely a better way to achieve what I am going for here so any pointers would be greatly appreciated.
Thanks.
Here is how I would do it. Not sure why you want to use query strings for this as IIS is made to do that if you configure it properly.
In your DNS server register all your websites to point to that IP. This is for when you go live. For development the hosts file is a good solution.
When you create the websites add a Host header like below
Now try loading any website by their full name
http://www.site1.com
http://www.site2.com
http://www.site3.com
Here is more info about IIS host headers.
Again, when you go live make sure you have the DNS set up for all the websites to point to the IP address of your server.
Hope this helps.
Edit based on comment:
Right, here is how I solved this in the past.
You can do all this with the hosts file but it's less painful if you have a proper DNS server to resolve the names.
The basic idea is to use slightly different URLs for development on the local machine.
All devs would have site1.com point to the IP of the shared server and site1.com.local point to 127.0.0.1. So a hosts file on a developer machine would look something like:
191.238.112.62 www.site1.com
127.0.0.1 www.site1.com.local
On all development machines you need to make sure you have the .local host header for all sites.
On the shared server you just need to add the right host headers and no hosts file changes. It's actually a bad idea to change the server hosts file.

Can a Java web app listen to a tcp port in a local network?

forgive the triviality of my question. I was asked this question and I wasn't able to find a proper answer so I decided to research this myself and understand. I have spring ,maven etc background. Supposing I deployed my web app on a box 192.168.0.10 in my network, can I listen on the port say 9090 of the 192.168.0.10 and do something with it in my application itself running on tomcat7 on the usual port 8080.
What all this is supposed to do is listen on a port and display a graph on the client side based on the value received.
I was thinking using maven, I will have a jar packaged project handling the networking bit and transfer the control to the web app.Event that it's really blur in my mind.
Can anyone clarify things a little bit for me?
Thanks in advance
Why do you need a different port, effectively your web app is already callable on the port provided by tomcat. You can have various servlets each distinguished by URL, and one can return graphs. There's lots more possibilities, but I don't see any need for another port.

How can I get the machine name of a server from its IP address?

Can anyone tell me how to get the machine name where the server is hosted
i know its IP address.
I know it can be sent from the server itself but still was curious about how it could be done from the Iphone.
Thnks in advance
Regards
Nitesh
I assume you're trying to do a reverse DNS lookup. There are some web-based services which you could use from an iPhone. For example: http://www.ipchecking.com/
However, if the IP address is being used by more than one server, this may not give you helpful results. It's also possible that the service you're looking for on the server could respond only to a name different than the one listed.