Recreate the default website in IIS

前端 未结 8 685
北荒
北荒 2020-12-02 09:46

I\'ve accidentally deleted the default website in IIS; It no longer shows up in the tree of IIS manager and browsing \"localhost\" returns a 404 error.

I\'ve re-inst

相关标签:
8条回答
  • 2020-12-02 10:27

    Did the same thing. Wasn't able to recreate Default Web Site directly - it kept complaining that the file already existed...

    I fixed as follows:

    1. Create a new web site called something else, eg. "Default", pointing to "C:\inetpub\wwwroot"
    2. It should be created with ID 1 (at least mine was)
    3. Rename the web site to "Default Web Site"
    0 讨论(0)
  • 2020-12-02 10:27

    I suppose you want to publish and access your applications/websites from LAN; probably as virtual directories under the default website.The steps could vary depending on your IIS version, but basically it comes down to these steps:

    Restore your "Default Website" Website :

    1. create a new website

    2. set "Default Website" as its name

    3. In the Binding section (bottom panel), enter your local IP address in the "IP Address" edit.

    4. Keep the "Host" edit empty

    that's it: now whenever you type your local ip address in your browser, you will get the website you just added. Now if you want to access any of your other webapplications/websites from LAN, just add a virtual application under your default website pointing to the directory containing your published application/website. Now you can type : http://yourLocalIPAddress/theNameOfYourApplication to access it from your LAN.

    0 讨论(0)
提交回复
热议问题