Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just enabled multisite in Wordpress and I get this message:

Warning! Wildcard DNS may not be configured correctly!

The installer attempted to contact a random hostname (3757b5.mysite.no) on your domain. This resulted in an error message: Could not open handle for fopen() to http://3757b5.mysite.no

I'm not getting these errors for single site installations, just when I enable multisite.


My web server is running on Ubuntu 11.1 on my Virtual Machine (VirtualBox).
And to be clear: this is on my local development computer. It's not on a ISP server.


I've checked php.ini to see if fopen is enabled, and it is:
allow_url_fopen = On

The default Apache config file found in /etc/apache2/sites-avaialble/default looks like this:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

And the Apache config file for my site looks like this:

<VirtualHost *:80>
    DocumentRoot /var/www/mysite/
    ServerName mysite.no
    ServerAlias *.mysite.no

 <Directory />
    Options FollowSymLinks
    AllowOverride All
 </Directory>

 <Directory /var/www/storelocator/>
    AllowOverride All
    Allow from all
 </Directory>

</VirtualHost>

Does anyone know what I can try to solve this issue?

NOTE
To access mysite.no and my subsite, I have updated my HOST file which resides on my computer (Win 7):

10.20.23.104       mysite.no
10.20.23.104       engelstad.mysite.no
share|improve this question
    
Do you want or need wildcard hostnames to function? What does the DNS configuration look like for this domain? –  Shane Madden Apr 17 '12 at 22:05
    
It is a requirement to allow wildcards in order to have WP multisite work with sub-domains. Where can I find the DNS configuration? This is on my local computer. –  Steven Apr 17 '12 at 22:12
    
You only need a wildcard if you actually need to have it work with all arbitrary subdomains. If you're only going to have a small handful of subdomains, then you certainly don't need a wildcard. The DNS configuration for the domain depends on how you've configured it; do you own the domain in question? –  Shane Madden Apr 17 '12 at 22:16
    
@shane-madden - it's on my local computer. I'm running Virtual MAchine. –  Steven Apr 17 '12 at 22:17
    
In your configuration, you have *.mysite.no. Is that a placeholder for a domain name that you own? Or is that literally what you have configured, and you're looking to have that domain point to the local Apache service for requests that come from your computer? –  Shane Madden Apr 17 '12 at 22:19

1 Answer 1

I believe that this is so any non-explicit subdomain will be sent to your web server where Apache assigns the request to a particular virtual host.

Create a star record if you want that ability:

*.mysite.no.       3600       A       [ip-address].

You would create the DNS record in the control panel that exists wherever you bought the mysite.no domain.

share|improve this answer
    
It's on my own computer. I'm running a Virtual Server. –  Steven Apr 17 '12 at 22:16
1  
What are you using for DNS to resolve mysite.no? –  Wesley Apr 17 '12 at 22:19
1  
@Steven It's not possible to create a wildcard entry in the hosts file. Ignore the warning, and create explicit entries for each subdomain that you want to use. –  Shane Madden Apr 17 '12 at 22:23
1  
@Steven Your Apache configuration does not have any bearing on name resolution. You said you're using your hosts file; what have you added to it? –  Shane Madden Apr 18 '12 at 0:04
2  
Because the name cannot be resolved. Because it's querying a random name within the domain, in an effort to verify that you've created a wildcard DNS entry; a DNS entry that does not exist and can never exist when you're using a hosts file for your name resolution. –  Shane Madden Apr 18 '12 at 0:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.