我有一个网站正在运行Ubuntu 16.04vps 与 Apache。最近我无法使用其 IP 地址访问主网页。请帮我调试我的服务器配置。
主站点.conf:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName X.X.X.X
DocumentRoot /var/www/html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
apache2.conf包含:
...
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /usr/share>
AllowOverride all
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride all
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
...
和/etc/hosts:
127.0.0.1 localhost
127.0.1.1 guest-desktop
185.211.88.62 student.aut.ac.ir student
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters