【发布时间】:2017-03-13 08:12:58
【问题描述】:
我在 linux ubuntu 上为 apache2 网站创建了虚拟主机:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName motornetwebservice.dev
DocumentRoot /var/www/Motornet/webservice/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/Motornet/webservice/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/motornetwserror.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/motornetwsaccess.log combined
</VirtualHost>
我已经在 etc/hosts 中设置了这个值:
127.0.0.1 webservicemotornet.dev
并重新启动 apache。
网站在 chrome 中正确加载,但 在 Firefox 中我得到 server not found 错误。我检查了所有 Firefox 文档并在我的机器上重新安装了它,但我没有解决方案。
有什么建议吗?
【问题讨论】:
-
你检查过 apache 的日志吗?
-
是的,访问日志和错误日志中没有数据
-
你试过
http://127.0.0.1/webservicemotornet.dev吗?所以而不是localhost你把IP -
这个问题可能对你有帮助:askubuntu.com/questions/682501/…
-
对不起,我看到在虚拟主机中我有 morotnetwebservice 而在主机中我有 webservicemotornet。现在可以了。
标签: linux apache ubuntu firefox