【发布时间】:2017-12-15 01:05:27
【问题描述】:
我无法从网络中的另一台计算机连接到 mysite.com。几个相关的配置文件如下所示。
我的apache2.config:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
NameVirtualHost *:80
ServerName 157.50.13.131
Include /etc/apache2/sites-available/*.conf
我的/etc/hosts:
127.0.0.1 localhost
127.0.1.1 ashwin-HP-Notebook
127.0.0.1 mysite.com
The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
我的虚拟主机配置文件(/etc/apache2/sites-available/mysite.conf):
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName mysite.com
DocumentRoot /home/ashwin/mysite
<Directory /home/ashwin/mysite/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/mysite/error.log
LogLevel warn
CustomLog /var/log/apache2/mysite/access.log combined
</VirtualHost>
当我从局域网中的系统尝试 192.168.0.100/mysite.com 我得到在此服务器上找不到请求的 URL/mysite.com
为什么这不起作用?
【问题讨论】:
-
您是否收到错误消息?是什么?
-
我没有收到任何错误,服务器正在运行。但是当我尝试使用 mysite.com 从网络中的另一个系统访问它时,它只会显示“无法访问此站点”