nginx是当下流行的http服务器和反向代理服务器。
安装流程:
1、去http://wiki.nginx.org/Install 下载最新版本;
2、解压:tar-zxvf nginx-1.2.4.tar.gz;
3、安装命令:
./configure
make
make install
4、如果安装成功,默认安装在/usr/local/nginx目录下;
静态服务器配置:
非常非常简单,打开conf/nginx.conf
server {
listen 18080;#端口
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/local/nginx/html;#主目录
index index.html index.htm;#默认index页面
}