Answer the question
In order to leave comments, you need to log in
Sharing site on XAMPP?
We make a corporate website. Installed XAMPP on the local computer, made a site that is visible on localhost, i.e. at 127.0.0.1 and that's it. How to make it available on the local network and over the Internet?
Answer the question
In order to leave comments, you need to log in
you can immediately go to the local IP address of the computer where the site is located and the page will open
edit the hosts file
127.0.0.1 ip on the local network (example: 127.0.0.1 10.42.0.1)
add to httpd.conf
< VirtualHost ip on the local network: 80 >
DocumentRoot / site path
< / VirtualHost >
and it is necessary that he resolve by name?
then you need to either raise DNS on the local network with a pointer to the host address, or on all computers that need to access it in the hosts file, add lines like:
192.168.0.115 mycoolsite.ru
where, respectively, the ip of the host and the name by which it will be resolved
to be seen from the Internet - you need to forward port 80 on the router, and the router must have a DNS name (you can use DynDNS for dynamic addresses)
forward port 80 from the router to the computer with the server. On the router, respectively, there must be an ip visible from the Internet.
it is not seen most likely because the apache does not listen to the network on this ip. I don’t remember exactly if there is such a pedal in xampp, but you either need to edit httpd.conf or directly in the interface it turns on / off in the Xampp admin panel. (something like Put online)
in wamp, there is an item in the menu that includes visibility from the outside.
he does this with a script that takes and changes the rights to the folder in httpd.conf
in
the docroot parameters:
<
Directory "c:/wamp22/www/">
and for invisibility the following lines:
Order Deny,Allow
Deny from all
Allow from 127.0.0.1";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question