Terix Terix - 2 months ago 13
Apache Configuration Question

ERR_NAME_NOT_RESOLVED on third level domain localhost for WPMU

I'm setting up WP Network on my localhost. I'm on windows, using Uniform Server, and I've setup a vhost like this:

<VirtualHost *:${AP_PORT}>
ServerAdmin webmaster@themes.wp
DocumentRoot ${US_ROOTF}/vhosts/themeswp
ServerName themes.wp
ServerAlias www.themes.wp *.themes.wp
ErrorLog logs/themes.wp-error.log
CustomLog logs/themes.wp-access.log common
<Directory "${HOME}\vhosts\themeswp">
Options Indexes Includes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


plus I've added this on the windows Host:

127.0.0.1 themes.wp


If I go to

themes.wp


everything loads fine. If I try a third level domain, like

dummy.themes.wp


I get

ERR_NAME_NOT_RESOLVED


Wordpress Network tells me this:

Warning! Wildcard DNS may not be configured correctly!
The installer attempted to contact a random hostname (9f3c9c.themes.wp) on your domain.
This resulted in an error message: cURL error 6: Could not resolve host: 9f3c9c.themes.wp

Answer

Right, themes.wp and dummy.themes.wp different domains

Fast way: add dummy.themes.wp to you hosts file 127.0.0.1 dummy.themes.wp

Or install any simple dns server because hosts not support wildcard domains