Deleting a website

Hi,

Suppose I have several different websites on a Lucee server, and each of the websites has a folder in the wwwroot.

Every website is a web context, right?

My colleague deleted a website folder, let’s call it OldWebSite in the wwwroot folder because he no longer needed it. Following the deletion of the folder of OldWebSite, he was no longer able to update or add datasources in the server admin. He was getting an error message related to the lucee-web.xml.cfm file related to the OldWebSite path. Sorry I don’t have the whole error message.

I looked the web contexts shown on the Overview page of the server admin, and the web context of OldWebSite was still there. I had to restart Tomcat / Lucee with Tomcat Service Control app to get rid of the web context and now the error message is gone. Everything seem fine.

What is the correct procedure to remove a website from Lucee? Do we really need to stop the service and/or restart Lucee to remove a web context?

Thank you!

OS: Windows Server 2016 (10.0) 64bit
Java Version: 1.8.0_181 (Oracle Corporation) 64bit
Tomcat Version: Apache Tomcat/8.5.33
Lucee Version: Lucee 5.3.8.206

https://luceeserver.atlassian.net/browse/LDEV-4007

2 Likes

Consider “D:/lucee” as your lucee install folder and domain “local.luceetest.com” as you want to delete the website

To delete the website from lucee. Please follow the below steps,

  1. stop the lucee server first.
  2. remove the tag <Host name="local.luceetest.com"> ..... </Host> from the D:/lucee/conf/server.xml file or delete the directory D:/lucee/conf/Catalina/local.luceetest.com (it depends upon the configuration you have)
  3. remove the configuration for the domain “local.luceetest.com” from the apache httpd-vhosts.conf file and restart apache.
  4. after that start the lucee server.

Stacktrace for the error

lucee.runtime.exp.NativeException: D:\luceeTest\WEB-INF\lucee\lucee-web.xml.cfm at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source) at java.nio.file.Files.newByteChannel(Unknown Source) at java.nio.file.Files.newByteChannel(Unknown Source) at java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source) at java.nio.file.Files.newInputStream(Unknown Source) at lucee.commons.io.res.type.file.FileResource.getInputStream(FileResource.java:243) at lucee.runtime.config.XMLConfigFactory.loadDocument(XMLConfigFactory.java:157) at lucee.runtime.config.XMLConfigWebFactory.reloadInstance(XMLConfigWebFactory.java:333) at lucee.runtime.config.XMLConfigAdmin._reload(XMLConfigAdmin.java:322) at lucee.runtime.config.XMLConfigAdmin.storeAndReload(XMLConfigAdmin.java:305) at lucee.runtime.tag.Admin.store(Admin.java:5240) at lucee.runtime.tag.Admin.doUpdateDatasource(Admin.java:2716) at lucee.runtime.tag.Admin._doStartTag(Admin.java:742) at lucee.runtime.tag.Admin.doStartTag(Admin.java:355) at services_datasource_create_cfm1334$cf.call(/admin/services.datasource.create.cfm:88) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1012) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:916) at services_datasource_cfm414$cf.call(/admin/services.datasource.cfm:108) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1012) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:916) at web_cfm$cf.call(/admin/web.cfm:492) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1012) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:916) at server_cfm$cf.call(/admin/server.cfm:2) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1012) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935) at

2 Likes

Hi!

We use Tomcat and IIS with BonCode and the paths are a little bit differents. The conf folder is in the Tomcat folder. I can’t find any reference of the deleted website in server.xml or in the Catalina folder. I suppose by restarting Tomcat/Lucee, a clean up happened?

So for our configuration, I suppose we need to :

  1. Stop Tomcat/Lucee
  2. Delete the website in IIS and delete the website folder
  3. Start Tomcat/Lucee

I marked anyway your answer as the solution.

1 Like

Thanks for opening a ticket.