Environment CentOS 7 X86
Document:
https://nginx.org/en/docs/
Installation:
[Email protected] ~]# cat/etc/yum.repos.d/nginx.repo [nginx]name=nginx repobaseurl=http:// nginx.org/packages/centos/7/$basearch/gpgcheck=0Enabled=1
[[email protected] ~]# Yum install Nginx
Configuration file: No changes are required by default
[Email protected] ~]# vim/etc/nginx/~]# vim/etc/nginx/conf.d/default. conf
Start:
# Nginx or # Systemctl start Nginx
Direct browser access.
Custom page: Once copied to the directory specified in the configuration file, it can be accessed in the browser.
[email protected] html]# pwd/usr/share/nginx/Html[[email protected] html]# lltotal +-rw-r--r--.1Root root537Apr A at: at50x.html-rw-r--r--.1Root root2595May A One:Panax Notoginsengindex_a.html-rw-r--r--.1Root root620May A One: +index.html-rw-r--r--.1Root root25987May A One: -Lonely.jpg[[email protected] html]#
such as: http://192.168.7.4/index_a.html
[web] [Nginx] First knowledge of Nginx