Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:01:06+00:00 2026-06-07T03:01:06+00:00

I am using Windows 7 with Wamp 2.2 server. I have setup 2 virtual

  • 0
  • I am using Windows 7 with Wamp 2.2 server.
  • I have setup 2 virtual hosts: www.project1.com and www.project2.com.
  • I have modified the “hosts“, the httpd.conf, and the httpd-vhosts.conf files, to the changes I mentioned below.

Using my browser, when I type www.project1.com or www.project2.com, I successfully get my web pages opened on the laptop that has the server installed on.

Changes in the “hosts file“: I’ve appended the followings to the end of the file:-

127.0.0.1       localhost
127.0.0.1       www.project2.com
127.0.0.1       www.project1.com

Changes in the httpd.conf file:-

Include conf/extra/httpd-vhosts.conf

Changes in httpd-vhosts file:-

NameVirtualHost *:80

<Directory "D:/websites/">
    AllowOverride All
    Order Deny,Allow
    Allow from all
    </Directory>
<VirtualHost 127.0.0.1>
    DocumentRoot "D:/websites/wamp/www/"
    ServerName localhost
</VirtualHost>


<VirtualHost 127.0.0.1>
    DocumentRoot "D:/websites/project1/"
    ServerName www.project1.com
</VirtualHost>


<VirtualHost 127.0.0.1>
    DocumentRoot "D:/websites/project2/"
    ServerName www.project2.com
</VirtualHost>

Now; since I can open these web pages from a browser in PC_1 (the one with the server), how can I access these web pages from a browser in PC_2? (I mean any PC connected to PC_1 via LAN.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T03:01:07+00:00Added an answer on June 7, 2026 at 3:01 am

    In your virtualhost directive, change 127.0.0.1 to *:80 and as Gabriel mentioned, add an entry to the hosts file in the other machine, adding your domain to be associated with the IP of your server.

    When you put an explicit IP into the directive, apache will only listen on that IP – but the wildcard will tell it bind to all IPs available to it.

    <VirtualHost *:80>
        DocumentRoot "D:/websites/project1/"
        ServerName www.project1.com
    </VirtualHost>
    

    If your server is on 192.168.1.70 for example, then in the other machines on your lan, the hosts entry will look like:

    192.168.1.70     www.project1.com
    

    Restart apache and it should work fine.

    As a note, when you are using virtualhosts, apache will use the first definition as a default for when it can’t make a match between the domain passed in the HTTP request header and the sites setup in the config, which is why your default page was appearing.

    You told apache to bind to all IPs with the NameVirtualHost *:80 directive, but then didn’t setup a site for that external IP. Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed PHP using wamp server in Windows and I have give the
I have windows server 2003 as my Operating Systme. I am using WAMP for
I am using windows 7 and wamp server 2.2, I have installed the wamp
I am using wamp server 2.0 on Windows XP. Whenever I create a table
Using windows server, I have a path to a file that, when you click
I have a development environment set up in Windows using WAMP. The production environment
I want to bake cake php project on Windows system. I'm using wamp server
I'm using the wamp package(Apache server) in my windows xp. After i followed the
Hi I'm new to php mysql development. I'm using wamp server on windows. php5.3.4,
I'm using WAMP as a server, and I have a need to execute svn,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.