• I installed WP Multisite into WAMP and followed the Codex document written by Andrea. It worked just fine for one day. Then I needed to restart my computer due to an unrelated issue, and when I tried to restart WAMP it would not start Apache and give me a green icon. I traced the problem back to this:

    ServerAlias *.mydomain.com

    directive that I added to my httpd configuration file. When I comment it out, WAMP loads with no problem. I am spoofing the domains using redirects frm my HOSTS file so the computer is finding 127.0.0.1 with no problem. My question is what exactly does that server alias directive do, and it is something I really need for local development work. I presume it will have to be there when I migrate this install to my external hosting service, but can I leave it as a comment for now and not break anything in WP? I am wary about what information gets left behind, or doesn’t get left behind, in the SQL database so that is why I am asking.

    Secondly, the Codex is clear that you must run WP Multi from the document root and not a folder. I don’t fully understand why that is, but I will believe Andrea on this one. However, is there any reason not to move the index.php file to a folder?

    That file has lots of comments, but only two lines that really do anything:

    define(‘WP_USE_THEMES’, true);
    require(‘./wp-blog-header.php’);

    I assume the first line sets an environment variable and is independent of the directory structure, and the second is the loader for the wp-blog-header. Once loaded, I suspect this line is never executed again until the next time I need to start WP. Do I have that right?

    The reason I ask is that the WP install writes over the WAMP Server 2 index page, which is kind of handy because I have other installs below the www folder, and I would like to retain that functionality. Also, the WAMP interface from the Windows notification icon has functionality tied to this page as well. My idea is to:

    1. Install a clean copy of WAMP
    2. Make a backup copy of the standard WAMP index.php
    3. Install WP Multi
    4. Create a new folder one level down from the document root
    5. Move the WP index.php into the new folder
    6. Restore the default WAMP index.php

    Naturally all the rest of the WP installation files would remain in the document root; only the one file would move. I don’t know php very well (gee, can you tell?) but would I be correct if I edited the path reference on that one line from this:

    require(‘./wp-blog-header.php’);

    to this:

    require(‘../wp-blog-header.php’);

    I would normally be brave and try to hack the standard WMAP index file since it is extensively commented, but the author of WAMP is French and the file comments are not written in English. However, I am not THAT brave since this is my first significant UNIX project.

Viewing 1 replies (of 1 total)
  • you can’t do wildcard subdomains on localhost.

    Secondly, the Codex is clear that you must run WP Multi from the document root and not a folder. I don’t fully understand why that is, but I will believe Andrea on this one. However, is there any reason not to move the index.php file to a folder?

    That exactly what that folder reference is talking about. Don’t move index.php and leave the rest of the files in a folder.

    YTou can *install* in a folder and run it from that folder. You can’t install in a folder and run it from another level (moving the index).

    Make a folder insdie the home folder.
    Put a line in your hosts file or apache config that the folder you just made is the root of a fake domain that you use locally.

    And do not edit core files. Never. Never ever. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Do I need the ServerAlias statement in Apache Config?’ is closed to new replies.