1. Installing Nginx
install nginx
2. Configure Nginx
1.查看nginx状态,启动,重载等命令
service nginx status start service nginx reload
2.添加虚拟主机在/etc/nginx/conf.d中建立相关的文件夹,将配置文件放到该文件夹下。配置文件例:vhosts_sample.conf
server { listen8080; #端口 root /usr/share/nginx/wlj; #网页文件存放路径indexindexindex.htm; # Make site accessible from http://localhost/ server_name wljcloud.com; #域名 location / { # First attempt to serve request as file, then# as directory, then fall back to displaying a 404. $uri$uri/ =404; # Uncomment to enable naxsi on this location# include /etc/nginx/naxsi.rules }}
3.修改nginx.conf文件,在http段下添加刚才的路径,例include /etc/nginx/conf.d/vhosts_conf/*.conf;4.将网页文件放到刚配置的路径中
cp -r 文件源路径 /usr/share/nginx/wlj
5.重新加载nginx的配置文件
service nginx reload
3. Visit the site
例:101.201.196.130:8080/index.html
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the Linux configuration webserver simple steps, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.