The MU forums have moved to WordPress.org

Installing WPMU with Apache2 (14 posts)

  1. JohnA
    Member
    Posted 17 years ago #

    I haven't found (yet) a specific post that deals with this.

    I have a dedicated server (yay!) that I want to use as a WPMU provider. I have root access (yay! x 2) so that isn't a problem.

    Q: The installation instructions for WPMU assume Apache 1.3 and I'm using Apache2. So how do I configure Apache2 for WPMU to use subdomain.domain.com?

    I have already configured a wildcard *.domain.com with my DNS provider, so that isn't a problem.

    I have installed WPMU, setup a MySQL database and a WPMU user with full rights to that database, so that isn't a problem. I have mod_rewrite installed so that's not an issue either.

    Any help gratefully received.

  2. lunabyte
    Member
    Posted 17 years ago #

    Shouldn't the edits to httpd.conf be the same, or at least similar enough?

    I'll be the first to admit I'm still on the 1.3.xx bandwagon, but while A2 is different in some aspects, aren't vhosts handled in the same/similar manner?

  3. JohnA
    Member
    Posted 17 years ago #

    Not really. The httpd.conf has been broken down into component .conf files on Apache2.

    If I was using Apache 1.3 I would be on easy street.

  4. quenting
    Member
    Posted 17 years ago #

    I have mu running on both and the settings are similar regarding virtual hosts.

  5. JohnA
    Member
    Posted 17 years ago #

    Could you post the relevant conf files to show how you did it?

    thanks

  6. quenting
    Member
    Posted 17 years ago #

    the only thing to be done really is to add a server alias *.domain.com directive to the virtual host. no need to post a config file.

  7. gecampbell
    Member
    Posted 17 years ago #

    I'm running Apache 2.2; here's the main configuration file for http://unpretentious.org:

    <VirtualHost *:80>
    ServerName unpretentious.org
    ServerAlias unpretentious.org *.unpretentious.org
    DocumentRoot /home/www/unpretentious.org/
    </VirtualHost>

    I also have a separate file to configure the /home/www directory:

    <Directory /home/www/*>
    Order allow,deny
    Allow from all
    Options FollowSymLinks
    AllowOverride FileInfo Options
    </Directory>

    Finally, I use the NameVirtualHost directive:

    NameVirtualHost *:80

    that's in a separate file (I basically use one file per domain).

  8. JohnA
    Member
    Posted 17 years ago #

    If I already have a domain running on the main server called example.com, then how do I add the virtual server for domain.com in such a way as to not interfere?

  9. nishkrant
    Member
    Posted 15 years ago #

    Not able to configure like above given instructions. Can someone please explain in step by step manner how to add configuration files like above.

  10. SteveAtty
    Member
    Posted 15 years ago #

    If you can't understand how to configure Apache2 to support virtual servers running in different homes then I dont think WPMU is the thing for you.

  11. tdjcbe
    Member
    Posted 15 years ago #

    Best bet would be to contact your host but, as noted if you're unable to understand the instructions in the readme file and what's above, I have to agree with Steve.

    The Is Mu For Me? Sticky may be a good read for you.

  12. nishkrant
    Member
    Posted 15 years ago #

    Thanks for the concern. I m able to install wordpress mu on Apache 1.x successfully. Problem is with Apache 2.2,
    Cant understand : I also have a separate file to configure the /home/www directory: as said by gecampbell and also Finally, I use the NameVirtualHost directive:

    NameVirtualHost *:80

    that's in a separate file (I basically use one file per domain). Where to add them

  13. eagano
    Member
    Posted 15 years ago #

    You really only need NameVirtualHost if you are running sites with multiple DocumentRoots. That is not the case for most setups of MU. If you are running MU and some other websites all with the same Apache instance, then you need a NameVirtualHost (common if you are running, for instance, five or six standalone WP installs).

    That said, it's easy to run MU on Apache 2.2. This is a sample for Debian/Ubuntu setup. You really should bind Apache to a specific IP, not all addresses.

    At the bottom of /etc/apache2/apache2.conf, but above the site include (most defaults are okay in this file)

    # setup a your NameVirtualHost
    NameVirtualHost 10.10.10.1:80
    
    # Include the virtual host configurations:
    Include /etc/apache2/sites-enabled/

    And now for your MU 'site' in /etc/apache2/sites-available:

    <VirtualHost 10.10.10.1:80>
    
       ServerName example.com
       ServerAlias *.example.com
       ServerAdmin webmaster@example.com
       ServerSignature On
    
       DocumentRoot /var/www/wordpress-mu
    
       <Directory /var/www/wordpress-mu>
          Options FollowSymLinks MultiViews
          AllowOverride FileInfo Options
          Order allow,deny
          Allow from all
       </Directory>
    
       LogLevel warn
       ErrorLog /var/log/apache2/example.com/error.log
       CustomLog /var/log/apache2/example.com/access.log combined_vhost
    
    </VirtualHost>

    If you want your logging to include the virtual host name (e.g. blogone.example.com, blogtwo.example.com, etc.) you'll need to define a new LogFormat and use %V for the virtual host name.

    LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_vhost

    When it's all done, use a2ensite to enable your site (creates symlinks from /etc/apache2/sites-enabled to sites-available), then reload Apache.

  14. nishkrant
    Member
    Posted 15 years ago #

    Thanks a ton....... People like you are responsible for progress of knowledge in humankind.

About this Topic