PDA

Показать полную графическую версию : virtual box lan access


Skit25
30-05-2016, 16:53
Доброго!

Помогите, пожалуйста, настроить доступ к сайту на Vbox извне.
100.500.100.500 - внешний IP.
10.0.2.15 локальный ip vbox (ifconfig)

захожу по IP, сайт открывается. Как зайти по IP+ServerName?
http://100.500.100.500/first
http://100.500.100.500/first/contact
http://100.500.100.500/first/login
и т.п.

Через роутер, пробросил порты на локалку, с нее проброс NAT VBox.

Мой /etc/apache2/apache2.conf

NameVirtualHost 10.0.2.15

-----
Мой /etc/apache2/site-available/site-first.conf

<VirtualHost *:80>
ServerName first

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/first/web

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/html/first/web>
AllowOverride All
Options Includes FollowSymLinks
DirectoryIndex index.php index.html
Allow from all
</Directory>
</VirtualHost>
-----

Мой /etc/hosts
127.0.0.1 localhost first
-----

У меня получается зайти по айпишнику, либо как в папку. Запросы через index.php идут, т.к. хост не настроен, они не обрабатываются.




© OSzone.net 2001-2012