【发布时间】:2018-12-01 18:04:55
【问题描述】:
为了托管多个网站,我更新了 /etc/nginx/default 文件如下:
server {
listen 8080;
server_name test;
root /var/www/test;
client_max_body_size 3096M;
location ~* \.(jpg|jpeg|png|gif|ico|css|js){
expires max;
}
}
在此之后,我将 /etc/hosts 文件编辑为:
IP address localhost test;
最后一步:
service nginx restart / service nginx reload
使用 : http://test 访问网站,但它正在重定向到 localhost 并显示 Ubuntu 安装页面。
【问题讨论】: