Copy link to clipboard
Copied
Hi everyone,
I've been playing around with CF10 with our server and it works great. It's just I've been wondering if it is possible to use Nginx as the web server? maybe someone can guide me through on how to make it work on a CentOS 5 server.
Thank you in advance.
Andrew
Copy link to clipboard
Copied
Hi Andrew,
Here's a couple of links that'll help.
Install Nginx: http://articles.slicehost.com/2008/12/17/centos-installing-nginx-via-yum
http://www.howtoforge.com/install-nginx-on-centos-5.5-with-ssl-pcre-geoip-zlib-gzip-and-dav-support
Config CF: https://groups.google.com/forum/?fromgroups#!topic/cfwheels/BupqApbipL8
Should cover what you're looking for.
Best Padz
Copy link to clipboard
Copied
Hi Padz,
Thank you for responding to my query. I've checked on the links that you gave and it's really helpful. Just one thing on the discussion for url rewriting, I think it still uses the internal web server "Apache Tomcat". Is there a possibility that this internal web server totally replaced with Nginx? Just like the option to use Apache web server upon installation of CF10.
Thanks again.
Andrew
Copy link to clipboard
Copied
Hi Andrew,
In a word, no. The reason being is that CF is a java web app so needs to live within a java app server. When you look at the deployment variations for CF you'll see that CF always lives within a java app server engine such as Tomcat, JRun, JBoss, Oracle As, Websphere .. java app server whatever.
By configuring an external web server such as Apache or IIS or JWS or Nginx you are proxying the web traffic through the web server to service the requests. So why bother using a web server? Well, two quick, very good reasons include:
Why Nginx over Apache? It's about resource utilisation on the hardware. Nginx has a much lower footprint than Apache (around 15mb vs 53mb per instance so handles more traffic). Nginx is reputed to process requests faster than apache as well. Nginx been around for 7+ years now so is pretty mature and stable. Nginx has also been used successfuly for software based load balancing in front of large website clusters.
Does that help answer the question?
Padz
Copy link to clipboard
Copied
Hi Padz,
I appreciate your effort to make this clear as possible. I guess I have to stick with nginx as reverse proxy instead.
Thank you so much.
regards,
Andrew
Copy link to clipboard
Copied
Hi Andrew,
As a quick follow up. Whats the difference between the java app servers and where does CF fit in? Ok, as stated previously CF is a java web app. It is deployed into a java web container and processes requests via a java servlet designed for delivering web based content {JSP, Java TagLibs and in our case CFML [complied into java byte code on execution].
Tomcat is expressly designed as a java web app container that can connect to a database and doesn't contain the additional java libraries for processing to larger systems using java2 EE protocols and is therefore used for web specific operations that, in effect, offer standalone services. For larger systems found in corporates and large websites requiring to have more sophisticated and complex resources for operation Java 2 EE compliant app servers are used as they contain additional java libraries [usually .jar files] offering a range of specific services for a limted set of functional tasks.
An example of the different deployments with CF illustrate how Cf fits in the the overall java scheme of things.
You can deploy CF as a standalone [contains Tomcat] or as a .war [java web achive - essentially a zipped file of java specific config and resources] or as an .ear [enterprise java archive file like the war but in within another java specific folder structure wrapper ].
Why makes ColdFusion / Railo / BlueDragon so great? In my view, they do tons of stuff out of the box for hooking into EE resources with minimal effort, are much faster to develop, more flexible and easier to maintain that their competitor technologies.
Note: If anyone wants to improve or comment on the above - feel free ; )
Best,
Padz