i have a flash game hosted on domain a.com which connects using sockets to a game server on domain b.com on a certain port other than 80.
now this doesnt work. the connection cant be established and i assume this is because of cross-domain security in flash-player.
now i have read that this problem can be solved with a crossdomain.xml file. but i dont quite understand where i have to put this? on domain a or domain b?
domain b doesnt even have port 80 open since that game server is listening on a custom port.
thanks!
I'll direct you to the official documentation. If you still have any doubts, please just let me know and I'll do my best to answer them. From your question, you want to know where the crossdomain file is hosted, the basic setting is that it should be hosted on the source domain, that is domain a, in the base of the host (a.com/crossdomain.xml).
Here's the base documentation file:
http://learn.adobe.com/wiki/download/attachments/64389123/CrossDomain_PolicyFile_Specification.pdf?version=1
A few specific guides that should help you:
http://www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html
http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html
Related
We've developed a server software and for ease of use for end-users, we are using the localtunnel-server app on one of our linux servers to get around the need for port forwarding and messing around with firewalls.
The problem is that it seems to tunnel "all" traffic on the port 80. However, we are afraid of this being abused. We would like to restrict traffic somehow and I wanted to know if that was even possible.
For example, let's say our app uses the "/myapp" virtual directory on the localhost website. So if a request is supposed to go to http://localhost/myapp/index.html then the traffic gets tunneled to http://mytunnel.myserver.com/myapp/index.html
The problem is, if there are other sites running on localhost, http://localhost/someotherapp also gets through. We'd like to block urls that don't match a format or contain keywords such as "/myapp"
Is that even possible? And if so, any guidance on how to achieve this, would be greatly appreciated.
I am trying to get my head around Windows, Networks and Domains.
I currently have a server - svr. This is on my domain companyname.co.uk
I can connect to server and ping both svr and svr.companyname.co.uk.
On this server I have a number of applications with web access; TeamCity, Octopus etc. We currently connect to them by browsing to svr:xxxx where xxxx is the port of the web app host (http://svr:9090/ for TC)
I want to create friendly alias' - for example teamcity.companyname.co.uk would point at svr:9090, octopus.companyname.co.uk would point to svr:8090.
However, not being experienced in this area I can't seem to find relevant documents or sites that fully explain what I am looking for.
First, to make one thing clear: when you visit a web page like http://example.com, your web browser is actually making a request to example.com:80. This is done transparently because port 80 is the standard port for the HTTP protocol. As you know, you can request a non-standard port by appending it to the domain name in the URL: http://example.com:888/.
Unfortunately, you cannot have a domain name "alias" that somehow includes a non-standard port - your browser will always try to use port 80 if you don't specify a port.
One solution would be to use a proxy - nginx, apache, lighttpd, and others can all do this.
The idea is that you set up a proxy server that is listening on port 80 on your host. It waits for connections, then forwards those connections to a different server (on the same host, or on a different one) based on some rule. So, for example, you might have rules that look something like this:
IF host = teamcity.companyname.co.uk THEN forward to teamcity:9090
IF host = octopus.companyname.co.uk THEN forward to octopus:8090
The syntax for these rules vary widely between different proxy configurations, so this is just an example.
Note that this is not a redirect - the user's browser connects to teamcity.companyname.co.uk for all requests. It's the proxy that sends the request on to a different service and forwards any responses back to the client "behind the scenes".
These proxy configurations can get quite complex. For example, what if your teamcity application serves a page with a link on it that points to http://teamcity:9090/path/to/page? The user's browser is going to fail if they click on that link. Fortunately, proxies can be configured to rewrite URLs like this on the fly. You'll need to do some research to tailor this solution to your situation.
Maybe I ask this question in a weird way, but I'll explain my goal here:
I'd like to let my domain example.com point to my ip 1.2.3.4.5:42, so for example (not the real reason) if I have a Minecraft server hosted at home on port 42, people don't have to typ example.com:42, but just typ example.com. I know normally it points to port 80, but I know for a fact that what I try to accomplish is at least possible.
I myself use Windows server 2012, but for future use and other users maybe it's a good idea to try answering this question for both Windows and Linux.
Subquestion: Why shouldn't I run my application on port 80, just like Teamviewer does?
You can't - DNS entries (with the exception of SRV records) have no concept of port-numbers.
If your actual application is HTTP rather than Minecraft you can use a 3xx redirect code from a web server running on the default port to push users to the non-standard port. However most other protocols don't actually have any such redirect mechanism.
I'd like to point a subdomain to an IP address plus a port number, but I have no idea how to do so, and Google isn't being very helpful. Any suggestions?
Came across this question while looking through my posting history, so I figured I may as well answer it now that I have more knowledge of the subject. What I was looking for were SRV records, which can be used to point a subdomain to a service on a port. However, the service must explicitly provide SRV support in order for this to work properly.
If the service will only be accessed through a web browser, it may be more practical to add a VirutalHost containing a reverse proxy to Apache. This is useful for services such as CI servers or Tomcat instances.
I have a VPS where I have hosted a few sites. All based on LAMP stack, so it was no big deal. They provide WHM/cpanel for managing different sites. I decided to try node.js, bought a separate domain for it, and I need some clue how to point that domain to the node.js application.
So here are the questions:
1) What is the best way to host node.js application on a specific domain without hampering the other sites? How will I configure the domain? Yes, I'd like to use default http port (80) for node.
2) As Apache is already listening to the 80 port, is it a good idea to use Apache mod_proxy for the purpose? I mean if I want to use websocket, will apache still use separate threads for maintaining connection to node?
PS. I have already seen this question, but the answers don't seem to be convincing.
Edit:
I forgot to mention, I have an unused dedicated IP for that VPS which I can use for node.js.
Follow these steps
Goto "WHM >> Service Configuration >> Apache Configuration >> Reserved IPs Editor" and then 'Reserved' the IP that you want to use for node.js. This will release the IP from apache.
Create a new DNS entry with a A entry like - example.com A YOUR_IP_ADDRESS
Tell the node.js server to listen to your IP using server.listen(80, "YOUR_IP_ADDRESS");
If Apache is already listening to port 80, then the only thing you can do is proxy to your node instance. And yes, apache will create a new thread for each connection.
As others have mentioned, there's not a whole lot you can do here. Apache is currently driving your server and node.js won't like riding shotgun.
I'd recommend checking out things like nodester, no.de, heroku, and so on.