我在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中我找不到服务器错误。我检查了所有firefox文档并在我的机器上重新安装它,但我没有解决方案。
有什么建议吗?
答案 0 :(得分:0)
抱歉,我在virtualhost中看到我有morotnetwebservice,而在主机中我有webservicemotornet。现在它有效!
答案 1 :(得分:0)
如果您的网站位于HTTPS上,则mozilla的Trusted Recursive Resolver版本的Firefox 62及更高版本的Firefox可能会导致/ etc / hosts在DNS解析方面被忽略。