简体   繁体   English

无法访问Apache Vhost

[英]Unable to access Apache Vhost

I'm running apache through a clean Ubuntu server VM on Parallels for Mac. 我正在通过Mac上Parallels上一个干净的Ubuntu服务器VM来运行apache。 I have it set up following this tutorial 我已经按照本教程进行了设置

But when I try to access it from my mac, I get no response. 但是,当我尝试从Mac访问它时,没有任何响应。 Ping returns a response, but not viewing the page in chrome. Ping返回响应,但不查看chrome页面。

Here is my vhost file ccminecraft.com.conf 这是我的虚拟主机文件ccminecraft.com.conf

I also tried putting in 我也尝试放入

192.168.1.108 ccminecraft.com
192.168.1.108 www.ccminecraft.com

into my hosts file on my mac, but that didn't work. 进入我的Mac上的主机文件,但这没有用。 nslookup returns that it's searching on google's DNS, which both my mac and router are configured to use. nslookup返回它正在Google的DNS上搜索,我的Mac和路由器都配置为使用该DNS。 But shouldn't it be going to 192.168.1.108 instead of doing a DNS lookup? 但是,它不应该转到192.168.1.108而不是进行DNS查找吗?

Try telneting the port 80 on your ip@ telnet 192.168.1.108 80 if it doesn't respond you need to reconfigure your firewall or disable it. 尝试在ip @ telnet 192.168.1.108 80 80上对端口80进行telnet 192.168.1.108 80如果它没有响应,则需要重新配置防火墙或将其禁用。

service iptables stop
systemd --> systemctl stop firewall

Before usig DNS try with ip@ so in : ServerName put yout_ip@ if it works you need to disble the adapter that link you to the internet and just let VM adapter enabled 在使用usig DNS之前,请尝试使用ip @,因此: ServerNameyout_ip@为有效,则需要yout_ip@将您链接到Internet的适配器,并仅启用VM适配器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM