Nginx Learning Record

Source: Internet
Author: User

1. The virtual host does not need to be configured directly on the nginx.conf, but needs to add the include *.conf under nginx.conf.

2. Create a new folder with the new suffix conf file. Code examples are as follows

server {

Listen 80;

server_name www.wuliaoren.org;

Location/{

Root html/www;

Index index.html index.htm;

}

}

3. The path from the code point to the Web page

--------------------------------------------------------------------------------------------------------------- -------

Diff Nginx.conf.default Nginx.conf vs. two file contents

Egrep-v "#|^$" nginx.default.conf > nginx.conf #号和空行过滤 The default file and generate a new file

Nginx.conf

--------------------------------------------------------------------------------------------------------------- ----------

Sed-n ' 1,8p ' www.conf output 1-8 rows of www.conf to the screen


Sed-n ' 1,8p ' www.conf > blog.conf www.conf 1-8 lines of content, creating a new file blog.conf

--------------------------------------------------------------------------------------------------------------- ------------

/SBIN/NGINX-T Check if Nginx is in normal condition

/sbin/nginx-s Reload to refresh the configuration

Change the Conf file about Nginx, you must execute the following two lines of command.




Nginx Learning record

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.