WordPress.org

Ready to get started?Download WordPress

Forums

Muti Site Sub-domains in wordpress (1 post)

  1. rajeesh39
    Member
    Posted 1 year ago #

    http://codex.wordpress.org/Create_A_Network

    after this just create virtual host by following:-
    1. Edit the “hosts” file on your windows system (usually located at c:\WINDOWS\system32\drivers\etc\)

    2. Add the following to the end of the hosts file:

    127.0.0.1 example.com
    127.0.0.1 site1.example.com
    127.0.0.1 site2.example.com

    This tells your computer that any url with a value of ‘site1′ or ‘site2′ should be routed to 127.0.0.1 or more commonly refered to as localhost.

    3. Save your changes.

    4. Now go to “C:\wamp\bin\apache\Apache2.2.17\conf” and edit file “httpd.conf”

    5. Search for “httpd-vhosts.conf”

    6. Remove the “#” from the beginning of the line “Include conf/extra/httpd-vhosts.conf”

    7. Now go to “C:\wamp\bin\apache\Apache2.2.17\conf\extra” and edit file “httpd-vhosts.conf”

    8. Add the following lines to the end of this file:

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

    DocumentRoot "c:/wamp/www"

    ServerName localhost

    ErrorLog "logs/localhost-error.log"

    CustomLog "logs/localhost-access.log" common

    </VirtualHost>

    <VirtualHost *:80>
    DocumentRoot "d:/wamp/www/example"
    ServerName example.com
    ServerAlias *.example.com
    <directory "d:/wamp/www/example">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    </directory>
    </VirtualHost>

    <VirtualHost *:80>
    DocumentRoot "d:/wamp/www/example"
    ServerName site1.example.com
    <directory "d:/wamp/www/example">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    </directory>
    </VirtualHost>

    <VirtualHost *:80>
    DocumentRoot "d:/wamp/www/example"
    ServerName sit2.example.com
    <directory "d:/wamp/www/example">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    </directory>
    </VirtualHost>

Topic Closed

This topic has been closed to new replies.

About this Topic