Subdomains on locally hosted multisite? (3 posts)

  1. cryssybee02
    Posted 2 years ago #

    I have multi-site set up on a locally hosted WordPress installation using IIS.

    To get it to work on my local setup, I changed my local site to a fake domain ("localhost.com:80"), and edited my hosts file like so: localhost.com

    Now I can create sub-domains, but I can't view them. Going to the new site or trying to access the its dashboard gives me a 404 error.

    I tried updating my hosts file with my sub-domains like so: localhost.com sub1.localhost.com sub2.localhost.com

    But that just gives me the IIS placeholder page instead.

    I'm at a loss as to how I can get this sub-domain thing to work. Switching to sub-folders would be an absolute last resort for me.

  2. jkhongusc
    Posted 2 years ago #

    What you did with your hosts file is correct in routing your request for the sub-domains to your local system.

    You probably did not configure IIS to handle the subdomains which is why you are getting the 404 errors. One quick way to check... your main site login page should be http://localhost.com/wp-login.php, try http://sub1.localhost.com/wp-login.php

  3. cryssybee02
    Posted 2 years ago #

    I checked http://sub1.localhost.com/wp-login.php

    When the subdomain is listed in my hosts file, I get an IIS generated 404 page.

    When the subdomain is NOT listed in my hosts file, I get the generic Firefox cannot find sever notice.

Topic Closed

This topic has been closed to new replies.

About this Topic