• Welcome to Auciou's Blog! Subscibe
  • HomeAbout AuciouArchivesContactSite MapLinks

  • Use Apache as the local virtual hosting to preview the Blog

    Auciou posted on October 12, 2009 at 22:08

    The setups of virtual directory, or virtual hosting are very convenient. In Apache, actually the virtual hosting is a virtual directory, so the setup of virtual hosting, and the setup of virtual hosting are complete the same. As the codes below which in the file of httpd.conf, is the default setting of http://localhost in the httpd.conf file:

    <VirtualHost *:80>
    ServerName localhost
    DocumentRoot F:/site
    </VirtualHost>

    Follow suit, if I want to use http://ww2.auciou.com to browse and test my Blog, copy the 4 lines of code as above, then change the values of ServerName in Line 2, and DocumentRoot in Line 3. The codes after change is as below:

    <VirtualHost *:80>
    ServerName ww2.auciou.com
    DocumentRoot F:/site/auciou
    </VirtualHost>

    Then restart Apache, as well you may create many virtual hostings at local.

    Open the file of C:\WINDOWS\system32\drivers\etc\hosts, write a line as below:
    127.0.0.1 ww2.auciou.com

    Then you may use Apache as the local virtual hosting to preview your own Blog, as the photo below:

    The simple and convenient installation of Apache and PHP, please view this article which was written by me http://www.auciou.com/peace/78. All of my present development environments, are based on this background of Apache and PHP, need not to reinstall Apache and PHP after reinstall the system.

    0 Comment:

    Post a comment:
    Name: (* Required)
    URL:
    Code: q48u58e68s78t88 (* Required)

    Comments:

        Remember? Yes No

    Post a trackback directly

  • Auciou: Programmer

    Peaceful Seabed | My column

    Category:
    Program | Internet | Computer
    Blog Research | PHP | Philosophy


    TDNote | Gratitude | Matnue | Aucist | Aroat | Aufirm | IXNes | Anydiary | Cersta | Coumit | Tovate | Aroat | Aucist | Matnue | Sinvide | Serble | Auciou's column | Peaceful Seabed | Webshu | Sail every day | Sail every day

    Archives:
    January 2011 | January 2010
    December 2009 | October 2009 | September 2009 | April 2009
    December 2008 | November 2008
    May 2007 | April 2007
    August 2005 | July 2005 | June 2005
    May 2005 | April 2005 | March 2005
    February 2005 | January 2005

    Recent articles:
    My Go Daddy hosting is fast
    Create a house with your spouse on the interest
    Pending time which add a domain of hosting, was more than 36 hours
    Diary: 2010-01-15
    Many Linux hostings do not support the mod_expires module
    Figured out, there is still a way
    About the delicated IP of IXWebHosting
    About the QUERY_STRING parameter of URL
    About the ping value and speed of site
    The relation between program and .htaccess file
    Saved a delicated IP
    Judge that does a long-range file exist in PHP
    How to call the Confederation of Planets and the high evolving beings of alien/pray/make a wish
    Use Apache as the local virtual hosting to preview the Blog
    Create the development environment of Apache
    Reinstall Apache and PHP for one step
    The elements of program of preventing the spam and closing IP
    How to close the visit log of ixwebhosting
    Happy Wedding to a friend
    Make an easy Audio/Video converter


  • Copyright © 2007-2025 auciou.com All rights reserved.
    Programmed by Auciou.