SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure if this is the best forum for this question:

    Normally, if we use apache, http://localhost is the only URL we can use, and that means only 1 site (equivalent of 1 domain). Now, I use it for development purposes only so I don't really care about how you do it, as long as it doesn't involve the Internet when running apache (I use a modem). What I want is something like: http://site1.localhost/, http://site2.localhost/ etc.

    I use win2k professional.

    Thanks in advance.

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2000
    Location
    Warwickshire, England
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -- Httpd.conf

    # VirtualHost: Allows the daemon to respond to requests for more than one
    # server address, if your server machine is configured to accept IP packets
    # for multiple addresses. This can be accomplished with the ifconfig
    # alias flag, or through kernel patches like VIF.

    # Any httpd.conf or srm.conf directive may go into a VirtualHost command.
    # See also the BindAddress entry.

    #<VirtualHost host.some_domain.com>
    #ServerAdmin webmaster@host.some_domain.com
    #DocumentRoot /www/docs/host.some_domain.com
    #ServerName host.some_domain.com
    #ErrorLog logs/host.some_domain.com-error_log
    #TransferLog logs/host.some_domain.com-access_log
    #</VirtualHost>

  3. #3
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do I put for server name? Will the computer just detect it?

  4. #4
    SitePoint Evangelist
    Join Date
    Jul 2000
    Location
    Warwickshire, England
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, but you need the domain in your hosts file (C:\windows\hosts) I think for win9x.
    e.g.
    I would add "127.0.0.1 test.localhost" to my hosts file (all on one line)

    <VirtualHost test.localhost>
    ServerAdmin webmaster@host.some_domain.com
    DocumentRoot /www/docs/docrootfortest
    ServerName test.localhost
    ErrorLog logs/logsfortest
    TransferLog logs/test.localhost-access_log
    </VirtualHost>

    should work



Bookmarks

Posting Permissions

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