自己学习,记录下来,仅供参考,高手就跳过吧
第一步:
sudo vim /etc/hosts
127.0.0.1
localhost
127.0.1.1
allen
#本地调试用的
127.0.0.1
www.example.com(你想要的域名)
# The following lines are desirable for IPv6 capablehosts
::1
ip6-localhostip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
sudo /etc/init.d/networking restart
第二步:
首先 看看我的nginx配置
user
allen allen;
worker_processes
1;
error_log
logs/error.log;
error_log
logs/error.log
notice;
error_log
logs/error.log
info;
pid
logs/nginx.pid;
events {
}
http {
}
如下 example.conf
server {
这样设置就是我把本地typecho应用的域名设置www.example.com
转自:http://blog.csdn.net/shujuliu818/article/details/47065917
转自:http://blog.csdn.net/shujuliu818/article/details/47065917