I have set up ColdFusion 9, as this is an old system, and have to change the host path. All of the code is already there, but it does not work because the path is wrong and it keeps redirecting.
The current default path is localhost:8500, but I need it to redirect to localhost:8500/newdir/. I thought by changing my systems32\drivers\etc\hosts file this would work, but it hasn't.
Windows with internal server for ColdFusion9, Apache.
Would like to redirect the host.
You need to edit the Mappings in the Server Settings section of the ColdFusion Administration.
Add a Mapping with / as the Logical Path and the physical path of /newdir as the Directory Path.
Related
In IIS version 7.5.7600.16385, I'm trying to redirect requests for example.com/* to www.example.com/*.
For example, if requests comes in like these:
http://example.com/ContactUS/
http://example.com/Donations/
I want IIS to redirect to these URLs:
http://www.example.com/ContactUS/
http://www.example.com/Donations/
So, as you can see, my goal is not to redirect all requests to the same static URL path. Instead, I'm trying to simply change the domain to the www subdomain while keeping the URL path intact for each redirect.
I've read articles that advise using an IIS extension called URL Rewrite.
However, when I try to install this extension the installer claims it is already installed, and even after a reboot, the URL Rewrite feature is not shown anywhere in IIS 7.5.7600.16385.
The only thing I can think of, that may be causing me not to see the URL Rewrite extension (in IIS), is that I do recall installing PHPManagerForIIS_V1.5.0.msi onto this same server several years ago. Maybe PHPManagerForIIS_V1.5.0 somehow overrides the URL Rewrite extension if you have it installed. I don't know.
Please advise if you know of a way I can accomplish my goal of dynamically redirecting all requests to their respective www canonical address, while keeping the URL path intact.
These are the steps I use:
1) I created new mapping inside CF Server => Server Settings => Mapping
logical path: /mysite
directory path: /Volumes/drive2/work/mysite
2) I restarted the server
/Applications/ColdFusion2018/cfusion/bin/coldfusion stop && /Applications/ColdFusion2018/cfusion/bin/coldfusion start
3) Using my preferred text editor, I created test.cfm inside /Volumes/drive2/work/mysite with the following contents
<cfdump var="#CGI#">
4) I then tried viewing the new file on my browser via
localhost:8500/mysite/test.cfm
I then get a 404 error. Exact message goes like "coldfusion.runtime.TemplateNotFoundException: File not found: /mysite/test.cfm"
I checked these 2 things:
I verified that /Volumes/drive2/work/mysite is readable by everyone (755 permission)
I verified that /Volumes/drive2/work/mysite/test.cfm is readable by everyone (644 permission)
Other than creating the mapping, the other configurations I've changed are:
created datasource for my app
Enabled debugging/logging but only after I got the first 404 error
Any ideas what I could be doing wrong? or perhaps other settings I should've set? I've added a screenshot of the mappings section below.
Thanks!
Edit: I'm using the built-in webserver provided by the standalone/developer edition. I'm also using localhost.
What you are attempting to do is not what ColdFusion mappings are for. ColdFusion mappings are used by ColdFusion code to access files. What you are attempting to do via a request like localhost:8500/mysite/test.cfm is access a folder through your web server. What you need to do for that is create a "virtual directory" using your web server admin.
You did not specify which web server you are using but it should be very easy to find documentation on how to accomplish what you need by searching your "web server name create virtual directory".
Here are a couple of examples for IIS and Apache.
IIS Virtual Directory
Apache Alias
If you are using the builtin Tomcat server, as we can assume by the use of localhost and port 8500, then follow the directions documented on the following page under the Adding a virtual directory for ColdFusion using the built-in Tomcat application server section.
ColdFusion Tomcat
I've configured a rails app on Digital Ocean (DO) using passenger, nginx and capistrano. Everything is working fine expect that I want to get the application's root_path page to be displayed whenever I go to the website. But that's not the case. I've to keep another page index.html in public directory and set it to root like:
xyz.conf file
root /home/user/apps/xyz/current/public;
I don't want this extra static page to be displayed. It just doesn't look good. Instead I want the application's root page which I specified in routes.rb file like root 'controller#method' to be displayed.
I've tried removing root line or restricting it to just /home/user/apps/xyz/current in .conf file but that just gives a 403 Forbidden error which should be the case.
I've thought a lot but can't think of anything. Anyone out there who had a similar problem and managed to figure it out?
Your nginx root is must be like:
root /home/rails/sample_tasks/public;
Note: path may vary but you need to set path till your app's public folder
then reload you Nginx
service nginx reload
I set up a mapping to run Canvas (CF-based wiki) on my machine. I have the following mapping in the CF Administrator; The physical location of the folder is correct, and the port number is accurate.
Logical Path Directory Path
------------ --------------
/canvaswiki C:\ColdFusion9\canvaswiki
When I type http://localhost:8500/canvaswiki/, I get a 404
java.io.FileNotFoundException: /canvaswiki/
I restarted CF's service to make sure that wasn't the issue, but it didn't help.
To access http://localhost:8500/canvaswiki/ from your browser, place the canvaswiki folder under C:\ColdFusion9\wwwroot. The full path will be C:\ColdFusion9\wwwroot\canvaswiki.
Using the Built-in Web Server
I installed Coldfusion 8 trial version on my system (XP Professional sp3).
I created an Folder in the “C:/Coldfusion8/wwwroot” called “buildProject” containing an Index.cfm and some other .cfm files.
But I am unable to access the Neither my project files or CFIDE/Administrator
I tried the following URLS
http://localhost:8500/wwwroot/buildProject/
http://localhost:8500/CFIDE/administrator/index.cfm
http:// 127.0.0.1:8500/wwwroot/buildProject/
http:// 127.0.0.1:8500/CFIDE/administrator/index.cfm
http://localhost /wwwroot/buildProject/index.cfm
http://localhost /CFIDE/administrator/index.cfm
http://localhost /wwwroot/buildProject/
http://localhost /CFIDE/administrator/index.cfm
Firefox can't establish a connection to the server at 127.0.0.1:8500.
* The site could be temporarily unavailable or too busy. Try again in a few
moments.
* If you are unable to load any pages, check your computer's network
connection.
* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.
• I cleared the browsing “History” from both IE and FF.
• I have restarted the CF server in the Control Panel >Administrative Tools > Services
• Even restarted the IIS
Getting the same error.
Further I was trying to access IE/FF via CFbuilder But still I am getting the error
“The connection was refused when attempting to contact [URL].”
If you connected Coldfusion to IIS, then you probably need to connect on port 80. Which you did try, but if you connected Coldfusion to IIS, then the document root is IIS's document root, not the document root you created your new directory in.
I believe the document root for IIS on XP is c:\inetpub\wwwroot.
So, try putting a test.cfm file in there that just contains "hello world" or something, and see if you can request it from there.
Hopefully you installed IIS first and were happy it was working before installing CF.
Try connecting to your IIS on http://localhost
You should get the default IIS .htm landing page , probably index.html or something, so at least you know IIS is working fine.
If you then try http://localhost/nosuchpage.htm you will see a 403 error (as long as you didnt specify to allow directory browsing). In the standard IIS error page you should be able to see
Physical Path D:\inetpub\wwwroot
or wherever IIS thinks your web root is. When you then install CF to use IIS (rather than standalone) it will use this path as your web root.
Rename your index.html file as index.cfm and connect to it on
http://localhost:8500/index.cfm
If vanilla html pages are working from the directory but .cfm pages are not then you probably need an CFIDE mapping (I think one quick workaround is simply to copy your CFIDE folder and drop it into web root).
What happens if you try typing this in as a url:
http://{your i.p. address}:8500/CFIDE/administrator/index.cfm
I bet it works