SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2001
    Montreal, Canada
    0 Post(s)
    0 Thread(s)

    Creating VirtualHost with Apache on Localhost

    As I dev my own web site and take care of the php coding of one of my friends web portal, I needed not to have both mixed (like accessing mine at localhost and my friend's at localhost/friend) The idea was to have two different document_root.

    I did the following steps:

    1- In the file hosts, I added this line friend.localhost

    2- In the httpd.conf file, I added the following:
        ServerAdmin me@friend.localhost
        DocumentRoot "e:\friend"
        ServerName friend.localhost
        ErrorLog logs/friend/error.log
        CustomLog logs/friend/access.log common
    I restarted Apache and this works. When browsing to http://localhost, I have my web site, when browsing to http://friend.localhost I get my friend's web site.

    I dont know if there are there any security risks doing that? I don't know, but I assume not because all IP starting with 127 are loopbacked to

    Last edited by ALSLG; Aug 28, 2002 at 20:09.
    Dis donc, qu'est-ce qu'il dit ce mec? Hein? Je comprends rien...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts