Search code examples
coldfusionlucee

Lucee - How to setup virtual sites and access the web administrator?


I'm using current Lucee on W2K16 with IIS. I installed Lucee and created a test site (test.lucee.xyz), added that to my hosts file and can browse it locally and everything seems to work.

I now added a 2nd site. Added through IIS as normal and then I edited

D:\lucee\tomcat\conf\server.xml

For my 2nd site I added a host:

<Host name="mango.tuitionrewards.com" appBase="webapps" unpackWARs="true" autoDeploy="true"  xmlValidation="false" xmlNamespaceAware="false">
   <Context path="" docBase="D:\webroot\luceetest.mysite.com" />
   <Alias>luceetest.mysite.com</Alias>
</Host>

Saved that, restarted Lucee and now have a WEB-INF folder in the site root:

D:\webroot\luceetest.mysite.com\WEB-INF

This site now works as well.

My question is it's my understanding that in the Lucee Administrator the Server tab is global, and the Web tab is specific to one site. For me, when I go into the Administrator, the URLs are:

http://127.0.0.1:8888/lucee/admin/server.cfm?action=overview
http://127.0.0.1:8888/lucee/admin/web.cfm?action=overview

How do I get the "web" Administrator to interact with the new site? Also is it safe to remove the first test site (test.lucee.xyz)?


Solution

  • If you installed Lucee using the Lucee Installer, and you selected the option to install mod_cfml and the BonCode Connector, all you need to do is create a site in IIS, and manage them like you normally would in IIS.

    mod_cfml will dynamically create the site contexts in Tomcat for you at runtime. You can create the contexts in the server.xml if you want to (this will start those contexts during Tomcat's startup cycle instead of at runtime), but the end result is the same.

    From there, you would access each site's web administrator from that site's URL:

    https://luceetest.mysite.com/lucee/admin/web.cfm?action=overview
    

    Hope this helps!