[web] [Nginx] First knowledge of Nginx

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.