Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

URL for 2nd wamp Site


  • Please log in to reply
1 reply to this topic

#1 Dingus

Dingus

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:01:29 AM

Posted 23 February 2018 - 12:55 PM

Hi there.

 

I have wamp installed on my PC.

I use this to host my own website as I don't need to host it on a secure server.

To access my site I use my static IP.

I saw this online and thought it would be good to be able to have different website on my wamp.

Can anyone tell me how to differentiate one from the other when typing the url?

 



BC AdBot (Login to Remove)

 


#2 VBCONZ

VBCONZ

  • Members
  • 39 posts
  • OFFLINE
  •  
  • Local time:03:29 PM

Posted 23 February 2018 - 07:02 PM

Several layers to this question.

1 - Your DNS records for two domains both point at your static IP (e.g. A records for foo.com and bar.com both point at your static IP )

2 - your firewall is open to point inbound traffic from port 80 and 443 at your pc ports 80 and 443

3 - WAMP - Add entries to httpd-vhosts.conf   (  \xampp2\apache\conf\extra\httpd-vhosts.conf )

 

e.g.

<VirtualHost *:80>
    ServerAdmin webmaster@foo.com
    DocumentRoot "C:\xampp2\htdocs\foo"
    ServerName foo.com
     <Directory "C:\xampp2\htdocs\foo.com">
        Allow from all
        Require all granted
        Options Indexes
    </Directory>
    ErrorLog "logs\tfoo.com-error.log"
    CustomLog "logs\foo.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@bar.com
    DocumentRoot "C:\xampp2\htdocs\bar"
    ServerName bar.com
     <Directory "C:\xampp2\htdocs\bar.com">
        Allow from all
        Require all granted
        Options Indexes
    </Directory>
    ErrorLog "logs\bar.com-error.log"
    CustomLog "logs\bar.com-access.log" common
</VirtualHost>

 

you might also need to alter xampp\apache\conf

from

# Virtual hosts
#Include "conf/extra/httpd-vhosts.conf"

 

to # Virtual hosts
Include "conf/extra/httpd-vhosts.conf"

 

Yes - examples here show xampp - but work for wamp as well. Adjust folder and drive names as required.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users