我甚至不知道我在做什么名字,这就是为什么问题的标题可能是不正确的。
在我的本地(Mac)计算机上,当在网站上工作的域名DNS仍指向不同的服务器时,我更新本地private/etc/hosts文件:
45.55.183.249 domain.com
其中45.55.183.249是主机的地址。
我希望这台远程计算机也能查find45.55.183.249 (localhost?)的domain.com请求。 我正在使用nginx。
我想这可以通过/etc/nginx/nginx.conf来完成,或者,因为我只通过include sites-enabled/*;托pipe单个站点include sites-enabled/*; :
/etc/nginx/sites-enabled/domain.com.conf
简单的内容就是这个要点 。
我注意到这个问题的原因,如果我完全偏离轨道,是以下错误:
FastCGI sent in stderr: "PHP message: PHP Warning: file_get_contents(http://domain.com/app/themes/themename/dist/images/arrow-down.svg): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found \ in /srv/www/domain.com/releases/20160519122018/web/app/themes/mytheme/front-page.php \ on line 20" while reading upstream, client: 108.205.62.184, server: domain.com, request: "GET / HTTP/1.1", \ upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "domain.com", \ referrer: "http://domain.com/wp/wp-admin/admin.php?import=wordpress&step=2"
(这个svgurl在我的本地电脑上已经解决了)
在此先感谢任何能帮助我消除无知的人。
根据评论:
45.55.183.249 domain.com放入远程计算机的/etc/hosts中。 /etc/hosts更改立即生效。