重启:/usr/local/nginx/sbin/nginx -s reload
1)安装nginx以及依赖库,自行百度解决;
2)修改配置文件代码:vim /usr/local/nginx/conf/nginx.conf
------------------------------------------------------------nginx.conf配置代码---------------------
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name 127.0.0.1:8990;
location / {
proxy_pass http://127.0.0.1:8990;
}
}
}
---------------------------------------------------------------配置文件结束-----------------------------
3)重启:/usr/local/nginx/sbin/nginx -s reload
或者启动nginx: sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf