Change IIS Website Home directory to a none relative home directory

I need to create a website where we only have the deployed website accessed via an IIS application.
I’ve worked out how we can create an IIS application using a script that is in the octopus library but now I need the website creation process to set it’s home directory to a none relative home directory. Is this possible without manual intervention?

for example:
IISWebsite1 --> D:\website\root
IISWebsite1\Application —> D:\Websitebuild



Thanks for reaching out. This sounds more like an IIS question. Do you mean something like this in regards to having the root of the site ( point to IISWebSite1\Application instead of IISWebsite1\?

Just trying to understand your scenario a bit more before I start typing an answer :slight_smile:




I Want the IISWebSite to point to a directory that contains no website and IISWebSite/Application to point to a website.

e.g. ==> goes nowhere ===> goes to a website that has been deployed by octopus.

I’m looking to have octopus to create the website but have it’s home directory reference to a dummy folder.


Thanks for clearing that up! You should be good to go with these steps

  1. Use this library step to create a website(*) and point it to a dummy directory. Unlike the regular deployment step, with this step template you are not forced to deploy code to the website you are creating.!/step-template/actiontemplate-iis-website-create

  1. Use this library step to create a Web Application under the site(*) and make it point to the path(**) where you’re gonna deploy the real content of the website!/step-template/actiontemplate-iis-application-create

  1. Use a regular deployment step with the Custom Installation Directory feature and deploy the package to the path(**) where your webapp is pointing to.

(*) You might wanna use a variable for the Site name like #{SiteName}

(**) A variable for this path like #{WebAppPath} would also come in handy

Let me know how it goes.



Yep that worked. One thing that need to be considered is that you need create the Application Pool separately