• Resolved BillMc

    (@billmc)


    I just completed a fresh install of WP3.1 on a fresh VPS. I followed the codex and…
    1. Setup http://www.primarydomain.com
    2. Cpanel’d a subdomain called *.primarydomain.com
    3. Parked http://www.secondarydomain.com
    4. Installed WP3.1 in the public_html directory on http://www.primarydomain.com
    5. I set permalinks to /%category%/%postname%/
    6. Added define(‘WP_ALLOW_MULTISITE’, true); to wp-config.php
    7. At WP Tools>Network selected subdomains
    8. At the Site Admin tab I added a new site: secondarydomain.primarydomain.com
    9. Verified with host that mod_rewrite was enabled
    10. Per WP Newtrok Setup I created .htaccess with the contents:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule . index.php [L]

    11. Added the foolowing to wp-config.php
    define( ‘MULTISITE’, true );
    define( ‘SUBDOMAIN_INSTALL’, true );
    $base = ‘/’;
    define( ‘DOMAIN_CURRENT_SITE’, ‘vpsfamily.com’ );
    define( ‘PATH_CURRENT_SITE’, ‘/’ );
    define( ‘SITE_ID_CURRENT_SITE’, 1 );
    define( ‘BLOG_ID_CURRENT_SITE’, 1 );

    At this point, I get 500 errors on both the dash, primarydomain.com and secondarydomain.primarydomain.com

    I looked at MySql and the database looks correct with wp_comments, wp2_comments, etc., etc plus wp_blogs, etc. etc. The sites are listed under “My Sites”

    If I delete the .htaccess file, primarydomain.com and the dash both resolve okay but secondarydomain.primarydomain.com returns “Server not found. Firefox can’t find the server at secondarydomain.primarydomain.com.

    So, I suspect the .htaccess is the problem but I can’t figure it out. Any thing I’m missing here?
    Thanks, Bill

Viewing 11 replies - 1 through 11 (of 11 total)
  • Cpanel’d a subdomain called *.primarydomain.com

    By this do you mean you created a wildcard DNS record?

    If I delete the .htaccess file, primarydomain.com and the dash both resolve okay but secondarydomain.primarydomain.com returns “Server not found. Firefox can’t find the server at secondarydomain.primarydomain.com.

    The htaccess files doesn’t render the second site. Wildcard subdomains do.

    Does your host support that? Simply adding it in your DNS records WILL NOT WORK if the host hasn’t added it to your vhost file for you.

    Thread Starter BillMc

    (@billmc)

    Sorry – I created a subdomain: *.primarydomain.com

    Thread Starter BillMc

    (@billmc)

    @andrea I told the host what I was doing and they told me that adding the sub via cpanel was all that was necessary so I assumed I was good to go. Perhaps I should check again!

    And that’s the DNS record.

    Again, ask your host. If they haven;t added that as a serveralias in Apache, then it will never work.

    Thread Starter BillMc

    (@billmc)

    Will do. I’ll come back and update once I get some further info from the host. Thanks to you and dgilmour for the lightening fast response!

    Thread Starter BillMc

    (@billmc)

    I have a ticket in with the host. In the meantime, here is what I think is the relevant section of httpd.conf. It looks to my naive eyes that the wildcard alias is there.

    <VirtualHost xx.xx.xxx.xxx:80>
    ServerName *.primarydomain.com
    ServerAlias *.primarydomain.com
    DocumentRoot /home/xxxxxxx/public_html
    ServerAdmin webmaster@primarydomain.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/_wildcard_.primarydomain.com combined
    CustomLog /usr/local/apache/domlogs/_wildcard_.primarydomain.com-bytes_log “%{%s}t %I .\n%{%s}t %O .”
    ## User xxxxxxx # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
    suPHP_UserGroup xxxxxxx xxxxxxx
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup xxxxxxx xxxxxxx
    </IfModule>
    ScriptAlias /cgi-bin/ /home/xxxxxxx/public_html/cgi-bin/

    # To customize this VirtualHost use an include file at the following location
    # Include “/usr/local/apache/conf/userdata/std/2/xxxxxxx/wildcard_safe.primarydomain.com/*.conf”

    </VirtualHost>

    Thread Starter BillMc

    (@billmc)

    Host confirms wildcard ServerAlias is specified in httpd.conf Now I’m stuck.

    ServerName *.primarydomain.com
    ServerAlias *.primarydomain.com

    Shouldn;t this be

    ServerName primarydomain.com
    ServerAlias *.primarydomain.com

    Thread Starter BillMc

    (@billmc)

    Andrea – I’m still waiting for a response from the host re the ServerName issue you pointed out. In the meantime, I got things sorted out. I had DNS issues because the seondary domanin is currently hosted at a different host than the primary. Once I got the nameservers pointed in the right direction. It just took some tweaks on domain mapping to get it up and running. Thanks for your input – I learned a lot about DNS versus httpd.conf.

    DNS is domain names.

    httpd.conf directs requests for those domain names to the right spot on your server.

    two different, but related things. 😉 Not a versus.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘500 error with .htaccess; site not found without .htaccess’ is closed to new replies.