logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Point sub-domains to different folder (WordPress MU)
Author
technicalsydney



Joined: 28 Apr 2009
Posts: 1

PostPosted: Tue 28 Apr '09 4:52    Post subject: Point sub-domains to different folder (WordPress MU) Reply with quote

I am new to Apache HTTP configuration. What I am trying to do is simple, but I am not quite sure how to configure the httpd.conf file.

This is what I am trying to achieve, I have a domain name that will run Joomla! on the main site and WordPress MU on the sub-domains.

For the main site (Joomla!):
www.mydomain.com and mydomain.com will need to point to the root folder: /httpdocs

For the sub-domains (WordPress MU):
I need to set up so that all the blogs, which will be created by WordPressMU as sub-domain will point to another folder, eg. httpdocs/blog/
Therefore, except for www. and (blank) sub-domains, the rest will point to /blog. For examples: john.mydomain.com, suzy.mydomain.com etc

How can I configure my httpd.conf to achieve the above?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 28 Apr '09 11:59    Post subject: Reply with quote

Do you want to have a redirect or should the subdomains point to the blog?

some example
Code:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot c:/server2/www
    ServerName mydomain.com
    ServerAlias www.mydomain.com

    ErrorLog c:/server2/logs/error.log
    CustomLog c:/server2/logs/access.log common
<Directory "c:/server2/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot c:/server2/www/blog
    ServerName john.mydomain.com
    ServerAlias suzy.mydomain.com
    ServerAlias paul.mydomain.com

    ErrorLog c:/server2/logs/blog.error.log
    CustomLog c:/server2/logs/blog.access.log common
<Directory "c:/server2/www/blog">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>
Back to top


Reply to topic   Topic: Point sub-domains to different folder (WordPress MU) View previous topic :: View next topic
Post new topic   Forum Index -> Apache