Я успешно установил "ЛАМПУ" и могу попасть на свой веб-сервер, набрав 10.0.2.15. Как я могу сделать так, чтобы при вводе моего доменного имени он отображал мой веб-сервер?
2 ответа
2
Свяжите ваше доменное имя с внешним адресом вашего маршрутизатора и перенаправьте порт 80 вашего маршрутизатора на сервер.
0
Вы можете купить DNS или воспользоваться этим решением:
It's likely that your router is engaging in Network Address Translation.
In order to see the web page inside your LAN from outside of it:
You'll have to turn on port forwarding on the HTTP port that you're serving
(80 is the default) to direct any traffic to the internal address. This
process varies from router to router, so you'll have to look at the manual
that came with that device.
It's best to also set up a static IP address for the computer serving the
website so that if it reboots, the port forwarding still works. This is unnecessary
if you can port forward using the hostname (not typically supported). This also
varies from router to router.
Direct your clients to your externally-facing IP address. If you don't have a
reserved IP through your ISP, this might change from time-to-time, especially
if you restart your modem, so I recommend...
(optional) Get an account at a dynamic dns host such as DynDNS to allow
external users to see a persistent address. You'll have to install some software on
the server to periodically make sure that the IP address is correct.