内部开发域名配置

1.线上要配置一个nginx的配置

server{listen 80;server_name online.feiniu.com;index index.html index.htm index.php admin.php;root  /home/wwwroot/default/feiniu/cow/Public;#error_page   404   /404.html;#include enable-php.conf;include enable-php-pathinfo.conf;location /nginx_status{stub_status on;access_log   off;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires      30d;}location ~ .*\.(js|css)?${expires      12h;}location ~ /\.{deny all;}access_log  /home/wwwlogs/access.log;
}

这里的online.feiniu.com就是一个假的域名。其实并没有域名指向它。

2.再在自己的电脑中配置一个hosts。

# 内部模拟
xxx.xxx.xxx.xxx online.feiniu.com

其中xxx.xxx.xxx.xxx为线上的ip。

配置好之后,就可以局部模拟开发了。

后记:
实践证明,并不好用。

会出现未备案。

转载于:https://www.cnblogs.com/jiqing9006/p/9443846.html


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部