我按照本教程设置了 Apache 虚拟主机,但浏览器无法提供主页。
\n\n这是我的 .conf 文件
\n\n<VirtualHost *:80>\n ServerAdmin webmaster@ednet.dev\n ServerName ednet.dev\n ServerAlias www.ednet.dev\n DocumentRoot /var/www/html/ednet/public\n ErrorLog ${APACHE_LOG_DIR}/error.log\n CustomLog ${APACHE_LOG_DIR}/access.log combined\n</VirtualHost>\nRun Code Online (Sandbox Code Playgroud)\n\n我的主机文件
\n\n127.0.0.1 localhost\n127.0.1.1 asad-HP-ProBook-4530s\n127.0.0.1 ednet.dev\n\n# The following lines are desirable for IPv6 capable hosts\n::1 ip6-localhost ip6-loopback\nfe00::0 ip6-localnet\nff00::0 ip6-mcastprefix\nff02::1 ip6-allnodes\nff02::2 ip6-allrouters\nRun Code Online (Sandbox Code Playgroud)\n\n但是当我尝试ednet.dev在浏览器中打开时出现错误
This site can\xe2\x80\x99t be reached\nednet.dev refused to connect.\nTry:\n\nChecking the connection\nChecking the proxy and the firewall\nERR_CONNECTION_REFUSED\nRun Code Online (Sandbox Code Playgroud)\n\nsudo netstat -na | grep 80输出
asad@asad-HP-ProBook-4530s:~$ sudo netstat -na …Run Code Online (Sandbox Code Playgroud)