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.

nginx configuration的更多相关文章

  1. Nginx - Configuration File Syntax

    Configuration Directives The Nginx configuration file can be described as a list of directives organ ...

  2. [Nginx] Configuration for SPA

    server { listen ; listen [::]:; default_type application/octet-stream; gzip on; gzip_comp_level ; gz ...

  3. Nginx Configuration 免费HTTPS加密证书

    Linux就该这么学 2018-05-11 实验环境:CentOS Linux release 7.3.1611 (Core) 内核版本:Linux version 3.10.0-514.el7.x8 ...

  4. kubernetes 的ingress controller 的nginx configuration配置参数

    下列列举一些参数其中常用的大家可根据实际情况自行添加(影响全局) kubectl edit cm nginx-configuration -n ingress-nginx 配置文件cm的定义: htt ...

  5. Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks

    原文链接:http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips- ...

  6. Nginx 反向代理、负载均衡、页面缓存、URL重写及读写分离详解

    转载:http://freeloda.blog.51cto.com/2033581/1288553 大纲 一.前言 二.环境准备 三.安装与配置Nginx 四.Nginx之反向代理 五.Nginx之负 ...

  7. nginx启动、关闭、重启

    1.启动 [root@localhost local]# nginx/sbin/nginx #启动 [root@localhost local]# nginx/sbin/nginx -t #检查配置文 ...

  8. Linux下安装nginx

    一直会使用nginx,也学习了好多nginx知识.也在本地安装过nginx,这次是第一次在正式的环境安装nginx,把这些记录下来总结经验. 一.安装环境 操作系统:CentOS release 6. ...

  9. 如何正确配置Nginx+PHP

    对很多人而言,配置Nginx+PHP无外乎就是搜索一篇教程,然后拷贝粘贴.听上去似乎也没什么问题,可惜实际上网络上很多资料本身年久失修,漏洞百出,如果大家不求甚解,一味的拷贝粘贴,早晚有一天会为此付出 ...

随机推荐

  1. 什么时候block 是放在全局区里面的?

    When a Block literal is written where there are global variables When the syntax in a Block literal ...

  2. Summary: 书架问题

    Consider the problem of storing n books on shelves in a library. The order of the books is fixed by ...

  3. C语言常用函数大全

    一.数学函数 调用数学函数时,要求在源文件中包下以下命令行: #include <math.h> 函数原型说明 功能 返回值 说明 int abs( int x) 求整数x的绝对值 计算结 ...

  4. Q_UNUSED

    Q_UNUSED() 没有实质性的作用,用来避免编译器警告 void func( int a) { Q_UNUSED(a); //函数体内没有使用a,避免编译器警告 }

  5. redis和memcached相关

    应该选择哪一种缓存机制 redis相较于memcached更加年轻,功能更加强大. 对小型静态数据进行缓存处理,最具代表性的例子就是HTML代码片段.使用memcached所消耗内存更少. 其他情况下 ...

  6. Python实现在给定整数序列中找到和为100的所有数字组合

    摘要:  使用Python在给定整数序列中找到和为100的所有数字组合.可以学习贪婪算法及递归技巧. 难度:  初级 问题 给定一个整数序列,要求将这些整数的和尽可能拼成 100. 比如 [17, 1 ...

  7. leetcode_目录

    3Sum Closest 3Sum 4Sum Add Binary Add Two Numbers Anagrams Balanced Binary Tree Best Time to Buy and ...

  8. C++ 电路布线/最短路径问题

    问题描述 用二维数组表示地图,若值为 1 则表示有障碍物,若值为 0 则表示可以通行. 输入: m*n 的二维数组,布线起点坐标,布线终点坐标. 输出: 最短布线距离以及对应的布线路径. 问题分析 从 ...

  9. SNMP学习笔记之SNMPv3的配置和认证以及TroubleShooting

    0x00 增加snmp v3用户 增加用户的时候,必须要停止SNMP服务. # service snmpd stop # net-snmp-config --create-snmpv3-user -r ...

  10. Jquery 给Js动态新添加的元素 绑定的点击事件

    //one $('.class').on("click",function(){ alert('one') }); //相当于$('.class').bind("clic ...