Need help with multiple URL setup on local CF9/Jrun install - url

I am running the ColdFusion 9 Developer edition on my local Windows XP machine. I've installed it with the embedded web server, which I believe is JRun.
Right now, I can only access web pages at 127.0.0.1:8500/whatever - with all of my apps being placed within separate directories, i.e.: 127.0.0.1:8500/app1, 127.0.0.1:8500/app2, etc.
I want to set it up so that I can access each app at: app1.mylocalserver.com, app2.mylocalserver.com, etc.
I have edited the hosts file so that these domains will be routed to my local machine. But how do I get CF9/Jrun to recognize these urls and handle them correctly? I have been playing with the WEB-INF/jrun-web.xml file but that seems to handle virtual file mappings only.
Thanks in advance for any help!
Gary

I wouldn't suggest using the built in web server. Can't you install Apache or use IIS?

if you changed it so those names are directed to your IP, shouldn't you just be able to go into site management and reference it there?
I use the built in one as well (for CF 9 on XP) and so far i haven't had an issue with it (been using it this way for over a year)

I have no idea to configure multiple URL. In IIS, it's simple to way configure multiple URL with different ports or binding different IP address.

Related

Accessing decommissioned website in Umbraco

I have a website that we used to access via Umbraco. It was decommissioned on 11/22 to a new site with same name. There is some content we need to retrieve. I was thinking maybe we could access it via IP but that doesn't work. Anyone know how to accomplish this so we can log on to the old site via umbraco without interfering with the new site.
If you log into the server and find the site in IIS, you could set up new bindings on that site, so it responds to decommissioned.mysite.com. Then add a host file entry to your local machine, so decommissioned.mysite.com sends you to your decommissioned site.
When your computer performs a DNS lookup, the host file is the first place it will look. This means you can use the host file to bypass the DNS settings configured for the public. It comes in handy when you have a dev version of a site that isn't ready for the world, yet. On windows you can find the host file at C:\Windows\System32\Drivers\etc\hosts. You will probably need to run your text editor as an administrator to edit the file. This is what host file entries look like:
123.123.123.123 mydomain.com www.mydomain.com
321.321.321.321 www.myotherdomain.com blog.myotherdomain.com

JBoss newbie can't load app to custom port

Thanks in advance for your patience. I'm a recent "convert" to JBoss, having the maintenance of an application thrust upon me, and so long as we don't touch it, it works just fine. However, the mandate has come down to port the app from Solaris to Linux Fedora, using version 4.2.3GA.
I am using the jboss-port-bindings.xml to specify the ports I want to use, but when I bring JBoss up it loads to standard port 8080 rather than 40029 like I specify in the file. I have triple-checked the configuration and it's set up on the Linux box exactly the way it's set up on the Solaris box - all the required files are where they are supposed to be, etc.
Anybody have an idea as to why I can't use the specified ports? If you need more information than what I have supplied, please just ask.
We found the problem. The jboss-service.xml file we had in the server/default/conf folder was correct, but we also needed to add the same file to the server/appname/config file, where appname is the name of our application. This told the app where to go looking for the jboss-port-bindings.xml file and now everybody's happy.
Don't know why we didn't have to have that configuration under Solaris, but anyway, this solved the problem. Thanks to those who had a look at the question. Chalk this one up to experience.

How do I access remote machine that runs on Pow (rails web server)

I've recently installed Pow on my Mac. It's great.
It's convenient for my own dev machine. But I wonder if I can set it up to be shared by my colleagues. The problem is DNS resolution part.
For example, if I have a dev site on my machine like "http://myapp.dev". How do I let my colleague access to the site on my machine from his machine?
The hacky way to do this is to make them edit their DNS and insert a record in /etc/hosts that maps to your machine. An easier way to do this is Localghost which doesn't require editing files by hand.
I've been using https://showoff.io and it works a treat. Also allows others not on local network to view it as well (if that's something you need).

Using Workspace.PendAdd in IIS doesn't work

I'm trying the WorkSpace.PendAdd method under Microsoft.Teamfoundation.Client namespace to add the local folder to TFS, it works normally when i debug with VS2010, but it doesn't work if it's published to IIS. I also tried giving the full control to the folder, but still no effect. Any idea will be appreciated.
Check to see what identity the web app is running under. Does that ID have appropriate rights in TFS? If you're hosting on a web server that is not also your TFS application tier, you could also be running into the two-hop limitation of passing identity.
When you're running in debug mode, it is probably picking up your credentials, and since your machine counts as hop zero, there's no problem passing them on to the TFS application tier.
I found a solution after checking the versionControl NonFatalError event.
Before the calling to workspace.PendAdd, just call:
Workstation.Current.EnsureUpdateWorkspaceInfoCache(
_versionControl,
_versionControl.AuthenticatedUser);
(for some reason it's the only way the specific file folder path will be mapped when running in IIS)

Can I edit an iPad's host file?

I doubt this is possible without extensive jail-breaking, but is it at all possible to edit the iPad's (or any iOS device's) hosts file?
The previous answer is correct, but if the effect you are looking for is to redirect HTTP traffic for a domain to another IP there is a way.
Since it technically is not answering your question, I have asked and answered the question here:
How can I redirect HTTP requests made from an iPad?
No, you can't change iPad's host file(without jailbreak), but can workaround.
Here is my scenario:
Mac OS X, with IP 192.168.2.1, running a web app
iPad, the device you would like to test the web app
Charles (for Mac), enables HTTP proxy for your iPad
I am going to test the web app running in my Mac via iPad, but I can't access directly to it.
The solution works for me:
Firstly, make sure that your server and iPad are in the same local network.
Then, set up Charles proxy, in the menu "Proxy > Proxy Settings...", fill in Port(mostly 8888) and toggle Enable transparent HTTP proxying.
Setup proxy setting in iPad.
Now you can visit your web app in iPad.
Of course you can use other proxy tools like Squid or Varnish in Linux, or fiddler in Wondows.
No. Apps can only modify files within the documents directory, within their own sandbox. This is for security, and ease of installing/uninstalling. So you could only do this on a jailbroken device.
The easiest way to do this is to run an iPad simulator using XCode and then add an entry in the hosts file (/etc/hosts) on the host system to point to your test site.
I needed the same functionality, and doing jailbreak is no-no. One solution is to host yourself DNS server (MaraDNS), go to your wifi settings in ipad/phone, and add your custom DNS server there.
The whole process took me only 10 minutes, and it works!
1) Download MaraDNS
2) Run mkSecretTxt.exe as administrator
3) Modify mararc file, mine is:
ipv4_bind_addresses = "put your public IP Here"
timestamp_type = 2
random_seed_file = "secret.txt"
csv2 = {}
csv2["Simple.Example.com."] = "example.configuration"
Add file called "example.configuration" into the same folder where run_maradns.bat is.
4) Edit your example.configuration file:
Simple.Example.com. 10.10.13.13 ~
5) Disable all Firewalls (convenience)
6) Run file "run_maradns.bat"
7) There should be no errors.
8) Add your DNS server to list, as shown here: http://www.iphonehacks.com/2014/08/change-dns-iphone-ipad.html
9) Works!
Yes, you can edit the iPad hosts file, but you need to be jailbroken. Once you've done that, download Cydia (app market), and get iFile. The hosts file is located within "/etc/hosts".
I would imagine you could do it by setting up a transparent proxy, using something like charles and re-direct traffic that way
Workarond I use for development purposes:
Create your own proxy server (One option would be: Squid on Linux).
Set your hosts file with your domains.
Set the proxy server on the IPAD/IPHONE and you can use with your hosts.
I know it's been a while this has been posted, but with iOS 7.1, a few things have changed.
So far, if you are developing an App, you MUST have a valid SSL certificate recognized by Apple, otherwise you will get an error message on you iDevice. No more self-signed certificates. See here a list:
http://support.apple.com/kb/ht5012
Additionally, if you are here, it means that you are trying to make you iDevice resolve a name (to your https server), on a test or development environment.
Instead of using squid, which is a great application, you could simply run a very basic DNS server like dnsmasq. It will use your hosts file as a first line of name resolution, so, you can basically fool your iDevice there, saying that www.blah.com is 192.168.10.10.
The configuration file is as simple as 3 to 4 lines, and you can even configure its internal DHCP server if you want.
Here is mine:
listen-address=192.168.10.35
domain-needed
bogus-priv
no-dhcp-interface=eth0
local=/localnet/
Of course you have to configure networking on your iDevice to use that DNS (192.168.10.35 in my case), or just start using DHCP from that server anyway, after properly configured.
Additionally, if dnsmasq cannot resolve the name internally, it uses your regular DNS server (like 8.8.8.8) to resolve it for you. VERY simple, elegant, and solved my problems with iDevice App installation in-house.
By the way, solves many name resolution problems with regular macs (OS X) as well.
Now, my rant: bloody Apple. Making a device safe should not include castrating the operating system or the developers.
If you have the freedom to choose the hostname, then you can just add your host to a dynanmic DNS service, like dyndns.org. Then you can rely on the iPad's normal resolution mechanisms to resolve the address.
You can also make use of a proxy server on your iPhone or iPade via mobile internet (3G) by using a iPhone Mobile proxy generator:
http://iphonesettings.net/mobileproxygenerator.php
Just enter the apn of your carrier (with apn username/password if needed) and the proxy server you want to go through and tap Generate
Problem Restated: Bypassing DNS Resolution
The problem the OP is trying to solve is NOT hacking hosts files on iPads per se, but rather bypassing DNS Resolution of a specific published DNS record by creating a static, local IP:name mapping on their device.
Solution:
A better- and more scalable- way is to create the static IP:Name mapping that you'd create in the hosts file on the device and instead create it on the router and then point your DHCP addressed clients to that router as the primary source of DNS resolution as I document (with annotated screen shots) HERE.
Conclusion:
When testing a new site you need to check the display of it on multiple devices to ensure there's no funky display or usability issues. Bypassing DNS checking using static local IP:Name mappings would require each developer to hack the hosts files for each of their devices and then remember to unwind the changes in all their devices after testing.
And were it even possible to hack an iPad's hosts file as the OP enquired about, in many organizations the Developers IT assets will be locked-down and they won't they have administrative permissions to do such tinkering.
Better to make the static mapping to bypass the published DNS record in the router and then you can delete it in one place after testing is completed.
You need access to /private/etc/ so, no. you cant.
Best Answer: Simply add http or https in your browser, the IP address, colon and port number. Example: https://123.23.145.67:80

Resources