在一台服务器上,访问不同的网站
通常有两种区分方式:
1.通过监听的端口号
2.通过域名
1.通过端口访问不同的主机:
Nginx的配置文件:
/usr/local/nginx/conf/nginx.conf
Centos文件默认编码格式 latin1
查看编码格式的命令: :set fileencoding
#user nobody;
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 {
worker_connections 1024;
}
##一个http节点
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_use