答案1
您需要使用 ssh 来安装 nginx。
启用 EPEL:
转速http://download.fedora.redhat.com/pub/epel/5/$(uname -m)/epel-release-5-3.noarch.rpm
安装 nginx:
yum 安装 nginx
在 Apache2 中更改监听:
监听 127.0.0.1:80
配置nginx:
例子:
server {
listen IP:80;
server_name example.com www.example.com;
location / {
proxy_pass http://127.0.0.1:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* \.(jpg|gif|png|css|js)$ {
root /var/www/example.com/;
}
}