zoukankan      html  css  js  c++  java
  • nginx configuration

    Now that you know how to manage the service itself, you should take a few minutes to familiarize yourself with a few important directories and files.

    Content

    • /var/www/html: The actual web content, which by default only consists of the default Nginx page you saw earlier, is served out of the /var/www/html directory. This can be changed by altering Nginx configuration files.

    Server Configuration

    • /etc/nginx: The Nginx configuration directory. All of the Nginx configuration files reside here.
    • /etc/nginx/nginx.conf: The main Nginx configuration file. This can be modified to make changes to the Nginx global configuration.
    • /etc/nginx/sites-available/: The directory where per-site "server blocks" can be stored. Nginx will not use the configuration files found in this directory unless they are linked to the sites-enabled directory (see below). Typically, all server block configuration is done in this directory, and then enabled by linking to the other directory.
    • /etc/nginx/sites-enabled/: The directory where enabled per-site "server blocks" are stored. Typically, these are created by linking to configuration files found in the sites-availabledirectory.
    • /etc/nginx/snippets: This directory contains configuration fragments that can be included elsewhere in the Nginx configuration. Potentially repeatable configuration segments are good candidates for refactoring into snippets.

    Server Logs

    • /var/log/nginx/access.log: Every request to your web server is recorded in this log file unless Nginx is configured to do otherwise.
    • /var/log/nginx/error.log: Any Nginx errors will be recorded in this log.
  • 相关阅读:
    一次http请求,谁会先断开TCP连接?什么情况下客户端先断,什么情况下服务端先断?
    nginx.conf详解
    50:树中两个结点的最低公共祖先
    49:把字符串转换为整数
    48:不能被继承的类
    47:不用加减乘除做加法
    46:求1+2+...+n
    45:圆圈中最后剩下的数字
    44:扑克牌顺子
    43:n个骰子的点数
  • 原文地址:https://www.cnblogs.com/JamyWong/p/10555339.html
Copyright © 2011-2022 走看看