Connection to remote database

0

Good, someone knows how to access a server created on wamp server in a local network from another computer but without putting the ip? I explain: to enter you have to put the ip of the machine where the server is, I need to enter without putting the ip I mean by putting a name as if it were a link.

    
asked by nahuel 21.09.2017 в 12:34
source

2 answers

0

To give a name to an IP address, configure the file httpd.conf in apache. It will be in the directory:

c:\wamp\Apache2\conf\httpd.conf

Look for something like:

DocumentRoot 'c:/wamp/www'

And add the following after DocumentRoot 'c: / wamp / www':

NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
    ServerName localhost
    DocumentRoot 'C:\wamp\www'
</VirtualHost>
<VirtualHost 127.0.0.1>
    ServerName yourdomain.com
    DocumentRoot 'C:\wamp\www\ClientsMyClient'
</VirtualHost>

I leave the English stack link: Wamp with domain name

EDITO according to comments:

So that your server always has the same IP, and clients can always connect on the same IP, you have to prevent your server from being assigned a random IP through DHCP.

To do this, you only have to assign a fixed IP to the computer on which the server is located. This is done in the ipv4 configuration.

Networks and internet > Change adapter settings > Local area connection > Properties > Internet Protocol version 4 (ipv4) > Properties > And there you indicate the IP that you want. Fixed IP

In this way the server will always maintain the same IP.

    
answered by 21.09.2017 в 12:39
0

To avoid putting IP, I use the DUC program of NO-IP , it's free. It works in the following way:

1.- You register and download the program (DUC) to your server.

2.- On the site or in the same application, create a domain that will serve as an alias to recognize that server on the network.

2.1.- [Additional] Configure your router so that all connections arrive directly to the server.

3.- Change your connection with the IP number by the domain (alias) that you generated.

This will allow you to connect to your server from anywhere.

Greetings.

    
answered by 21.09.2017 в 15:44