260722Nginx的下载与使用
(用于学习记录,肯有错误之处,今天的东西放到阿里云上做啦)
由于nginx和httpd都占用的是80端Nginx的下载与使用口,要把httpd先关掉:systemctl stop httpd
通过端口监听看看是否关掉:netstat -ano|grep 80
状态检查是否关掉:systemctl status httpd
下载:yum -y install nginx
开启:systemctl start nginx
开机自启:systemctl enable nginx
检查状态:systemctl status nginx
通过端口监听看看是否开启:netstat -ano|grep 80
nginx的配置文件查看:cat /etc/nginx/nginx.conf
要高亮的话用vim进去
(这个conf是配置文件,先去nginx看看找一下)
监听的80端口
地址在/usr/share/nginx/html把里面的页面删掉在加要的东西进去
另:如有出错回去这里:
有了域名可以给这段注释的注释去掉。