FUCK!!! nginx in ubuntu and yum don't support ubuntu
阿新 • • 發佈:2018-12-10
How to install nginx in ubuntu 18.0?
it very easy ,please follw:
step1: sudo apt install ngnix
over!!!!!
AND wo can try to build static_file service
step1: setting the static_file servicr config in the nginx
vi /etc/ngix/conf.d/file_service.conf
step2:add config information:
server { client_max_body_size 4G; ##注意80埠的佔用問題 listen 8080; ## listen for ipv4; this line is default and implied server_name 127.0.0.1; root /home/blues/Desktop/files; location / { autoindex on; ##顯示索引 autoindex_exact_size on; ##顯示大小 autoindex_localtime on; ##顯示時間 } }
step3: test nginx_cofig
/usr/sbin/nginx -t
step4: reload nginx conf
/etc/init.d/nginx reload