Bước 1: Cài đặt Nginx
Chạy lệnh sau để tiến hành cài đặt

yum --enablerepo=epel -y install nginx

Bước 2: Cấu hình nginx

Mở file /etc/nginx/nginx.conf
- Tìm:  worker_processes sửa thành

worker_processes 2;

- Tìm:  gzip sửa thành

gzip on;

- Tiếp theo chạy lệnh

cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.org



egrep -v "^ *#|^ *$" /etc/nginx/conf.d/default.conf.org > /etc/nginx/conf.d/default.conf 

- Mở file /etc/nginx/conf.d/default.conf 
tìm:  server_name www.server.world;  và sửa www.server.world thành server_name của bạn

Bước 3: Khởi động nginx

/etc/rc.d/init.d/nginx start 

chkconfig nginx on 

11 Dec 2014

Đăng nhận xét Blogger

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top