First, install nginx server click on the link to open
Second, the configuration server nginx
-
-
sudo /usr/sbin/nginx -t
-
-
-
-
sudo vim /etc/nginx/nginx.conf
-
-
-
-
cd /etc/nginx/conf.d
-
sudo vim fileServer.conf
-
---------------------------------
-
-
server {
-
client_max_body_size 4G;
-
-
listen 80;
-
xxx.xxx.xxx server_name;
-
root /ysdata/upgrade_file/http;
-
location / {
-
autoindex ON;
-
autoindex_exact_size ON;
-
autoindex_localtime ON;
-
}
-
}
-
Third, nginx reload configuration file
-
// test configuration file
-
sudo /usr/sbin/nginx -t
-
-
// reload the configuration file
-
sudo /etc/ init.d/nginx reload
-