1:安装c++编译环境,如已安装可略过;
yum install gcc-c++
2:编译:
./configure
3: 安装:
make && make install
4:启动:
whereis nginx ;
cd usr/local/nginx/sbin/
./nginx
5:浏览:
localhost
7配置:静态网页
server {
listen 80; # 监听本机所有 ip 上的 80 端口
server_name _; # 域名:www.example.com 这里 "_" 代表获取匹配所有
root /html/; # 站点根目录
index index.html;
include /etc/nginx/default.d/*.conf;
location / {
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}



