- May 27, 2024
- Posted by: Vikas
- Category: Lucee

For the configuring nginx for Windows in the software development process in Lucee/ColdFusion technology, which runs on Windows 10. In this environment, Using Lucee with IIS and Node.js with Express.js and iisnode. To replace IIS with nginx, in that process first downloaded nginx and developed it to C:/nginx
. Before configuring nginx, let’s set up Lucee. After installing Lucee it’s running on port 8888. Now, add your website entry in the engine tag as follows:
[apCI id=”71d04f27002f137ec36698a858041f21″ raw=”no”]
After that, create a lucee.conf
file and add it in C:/nginx/conf
folder with the following content.
[apCI id=”4a2ed481cd53da481313c123e9029d60″ raw=”no”]
Now, the second process is to configure nginx. Open the file C:/nginx/conf/nginx.conf
. Either remove the existing server block or adjust it according to the following:
[apCI id=”bf133af32fcee6bbaf12059edd74c846″ raw=”no”]
Additionally, add another server block for the Node.js application:
[apCI id=”c2ece77d7d9069e1c9932d0264c5a17c” raw=”no”]
The contents of mynodeapp.conf
file is as follows:
[apCI id=”29c8f83a2f015d7e5d168a72a5fcbf1e” raw=”no”]
With the required configurations completed, we need to stop the IIS service to acquire port 80. Open Windows services and stop the World Wide Web Publishing Service. It is necessary to set it to manual, so it doesn’t start automatically.
Now, in the third step, we’ll build a service for nginx so that it starts automatically with the PC. Refer to this Stack Overflow page for guidance on creating a Windows service wrapper for nginx.
Check out the nginx for Windows page for known issues and possible future enhancements. Open the nginx.conf file and note that the worker_processes
to 1. I tested my website with jMeter, and found that it gives poor performance than IIS. I increased it to 1024, and now it gives good performance than IIS.
I hope this post helps you. Let me if you find any issues with the configuration. Now that the required configuration is completed, it’s time to play with nginx to discover the best tuning option that suits your website.