alternative methods of hosting a java socket [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
In recent discussions on stackoverflow I have discovered that many/most web hosts dont allow java servers to be uploaded as they open ports and create a vulnerability in their system. Without paying extra for a java web host, how is possible to by pass this issue? Can php be used to somehow wrap the java programmed socket, or even write the socket itself in php? This is one method I have heard, but surely the host would look at this no differently than a java written socket- a security threat?
Whilst i'm on topic, how is it that paying more for a java webhost all of a sudden makes their system less vulnerable? Is this just a con to extort a little more by allowing ports to be open if your willing to pay for it, or is their something that i'm misunderstanding?
Thanks

Host it using a dedicated or VPS(virtual private server) below are 2 of my personal cloud/vps providers that i use. You can look around for more but yeah shared hosting in my opinion is for entry thing or when you don't want to have to worry about the underlying platform. If you have a understanding of linux and managing your own servers then i would go for vps all the way.
http://aws.amazon.com/ and https://www.digitalocean.com/
With regards to the PHP part of the question as I stated in my comment if you have ssh access you can run your PHP script php myscript.php though i am not to sure how you would wrap your java service.

Related

How to run node.js, Java and PHP application on same server and same port [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
How to run node.js, Java and PHP application on same server and same port, I was trying to run but unable to run.
You need some kind of HTTP proxy layer in front of all this, typically Apache httpd or NGinx. From there you can configure different paths to go to different applications if necessary.
The configuration directives vary considerably depending on the solution you're using, but you can have / go through to PHP and /node go through to Node, while /java goes somewhere else entirely. Just make sure your sub-components are using non-conflicting paths so they can all play nicely together or you'll have to do a lot of ugly URL rewriting.
You could use the varnish cache as a load director and set up different back-ends for each of those servers. Then you could parse the incoming urls to redirect to the appropriate application server. You can absolutely run all of those app servers on the same machine, with varnish listening on one port, and all the other services listening on other ports. It would be easy to firewall those services from external access as well.
Running each service on different machines is also entirely possible and easy. We've used this solution numerous times in different environments because Varnish is extremely light-weight, reliable, and does not have the overhead of a web server such as Apache or nginx which, while good options, can be overkill.
You also get the added benefit of the robust caching it provides. Bonus!

How can I run a pure java server on AWS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have registered to the free AWS plan, and I wish to run a pure java server code I have written on this machine, so I will be able to take this server's IP and use it to connect with my client.
After some searching in AWS I have found many products and features, but I still don't understand how to perform this simple task.
Create a new EC2 Instance SSH into it, install java and prerequisites.
Ensure -
Your Security Group is opened for port 22 for external internet - 0.0.0.0/0 ( or at least your IP )
Use t2.micro instance size - only that is covered under the free tier
Remember to save / store your keypair safely
Check the below links
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance_linux.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-connect-to-instance-linux.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-add-volume-to-instance.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-clean-up-your-instance.html

How to setup java environment in digitalocean? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I want to set up java/jsp environment in digitalocean VPS. I need help with that. I found help in digitalocean community but I want to know that which os is best for jsp and tomcat? And also the version of OS. I saw that tomcat is accessible at port 8080 so is there any option that i can access my site at port 80 or something like domain.com/index.jsp instead of domain.com:8080/indes.jsp?
I am still learning java and jsp so for that I need help to set up.
Tomcat can run on almost any OS, so choose one you are experienced and comfortable with. There's been a tendency to go with CentOS for server deployment, but as far as I'm aware no strong justification for choosing this over Ubuntu. Use whichever version is the most recent released version - for Ubuntu that's 14.04. DigitalOcean provide a variety of images and they're likely to be up to date and well supported.
Tomcat can be setup to run on any port you want, including 80. There are loads of guides to this, here's one that looks comprehensive: http://java-notes.com/index.php/installing-tomcat-with-http-port-80-on-linux

SSL Error when trying to download a Java JDK [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I need to download a particular version of the Java JDK, so I'm going to Oracle's website to do so. When I click any of the links to begin downloading a JDK, I get the following error message from my browser:
This is probably not the site you are looking for!
You attempted to reach download.oracle.com, but instead you actually reached a server identifying itself as a248.e.akamai.net. This may be caused by a misconfiguration on the server or by something more serious. An attacker on your network could be trying to get you to visit a fake (and potentially harmful) version of download.oracle.com.
You should not proceed, especially if you have never seen this warning before for this site.
Is this normal (i.e., does Oracle use akamai.net to host its JDK distributions), or does this suggest that Oracle or I are being attacked?
Neither Sun nor Oracle has ever used third parties to host JDK downloads in my experience since 1997.

Redirect local connections to another server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I want to develop a program, not language specific, that can redirect ANY connection to another one, like a proxy server, but for all connections. The language doesn't really matter, but is there a way to do this without modifying raw windows apis and such? I'm going to attempt this in java, but I can import C and C++ code with JNI. Also, what about mac/linux?
You should certainly consider/evaluate using TCP/UDP splice. It is a well-known mechanism for building proxies and is fairly efficient in terms of copying data form one connection to another.
URL: http://linux.die.net/man/2/splice
Java is the wrong language to attempt to do this in. Even if it is possible (e.g. on Windows), the real work would need to be done either using external utilities, or using native library calls.
Attempting to do this for multiple operating systems makes this even harder. The implementation mechanisms are bound to be different.
I don't know how you would do this in Windows, but on a modern Linux system you might do this using "iptables" to enable and configure the network packet processing in the OS kernel. This requires root privilege, a good understanding of the way that network protocols, and care ... since it is easy to "brick" your networking to the degree that you need console-level access to recover.
(And if you are using OS-level virtualization, it can get particularly complicated ...)
FWIW - It is possible to install and use a port of "iptables" on Mac OS/X ... thought it is apparently not supported by Apple.
On the other hand, if you are simply trying to have a Java application direct all of its own outgoing network connections via some kind of proxy, then you should be able to do this by configuring a custom SocketFactory implementation.

Categories

Resources