I have a number of websites that run under IIS on a single machine.
Should I put these websites inside of the C:inetpubwwwroot folder or inside the C:inetpub folder?
E.g.
- C:inetpubwwwrootWebsite1
- C:inetpubwwwrootWebsite2
or
- C:inetpubWebsite1
- C:inetpubWebsite2
Are there any pros/cons for either or another recommended location (I only have a C drive on this machine)?
I am not sure whether there is a “correct” answer to this, but want to follow best practice if there is one.
Many thanks,
Jonathan
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Go the second route.
wwwroot is simply there as the container for the default website for the server. If you delete the default website from within IIS, then you can safely remove this directory. Regardless, your sites have nothing to do with the default, so they should be in their own folders under inetpub.
That said, we sometimes have multiple “types” of sites on the same server. For example DEV and QA. In this case I would structure it as:
c:inetpubdevsite1
c:inetpubdevsite2
c:inetpubqasite1
c:inetpubqasite2
Method 2
As variant:
C:WebSitesmy.site1.com
C:WebSitesmy.site2.com
Method 3
if you prefer you can put your application folder on desktop of your server. It is really up to you. You just need to make the proper configurations inside IIS and grant necessary access permissions to your folder. That’s all.
Method 4
There is no definitive answer but
- C:inetpubwwwrootWebsite1
- C:inetpubwwwrootWebsite2
are the standard locations for web sites. For example c:inetpubftproot could be used to host an FTP site.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0