user nginx;
worker_processes auto; error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid; events {
worker_connections 1024;
} http {
include /etc/nginx/mime.types;
default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on;
#tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf;
}
server {
listen 80;
listen [::]:80;
server_name localhost; #access_log /var/log/nginx/host.access.log main; location / {
root /usr/share/nginx/html;
index index.html index.htm;
} #error_page 404 /404.html; # redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

默认nginx.conf的更多相关文章

  1. 基础篇七:默认配置语法(/etc/nginx/nginx.conf)

    首选我们 vim nginx.conf 参照上图,我们看看nginx.conf 的个参数含义 我们再看看 /etc/nginx/conf.d/default.conf

  2. Nginx配置文件nginx.conf中文详解(转)

    ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...

  3. <nginx.conf> nginx用户权限

    Nginx用户权限 在nginx.conf文件的第一行一般是设置用户的地方(编译安装nginx时的参数--user=<user>也是指定用户的地方),如 user www www; 如不指 ...

  4. CentOS下配置nginx conf/koi-win为同一文件的各类错误

    今天配置CentOS6.5下安装Nginx + php7 + mysql5.7.15遇到了一些坑.本来家里的电脑在配置环境的时候没有问题,拿去公司的电脑上就是到处报错.不知道是不是人品问题.今晚在家重 ...

  5. Nginx配置文件(nginx.conf)配置详解(2)

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

  6. Nginx的nginx.conf配置文件中文注释说明

    #运行用户    user www-data;        #启动进程,通常设置成和cpu的数量相等    worker_processes  1;    #全局错误日志及PID文件    erro ...

  7. nginx.conf详解

    ##定义nginx运行的用户各用户组user nginx nginx; ##nginx进程数,建议设置与cpu核心数一致worker_processes 1; #为每个进程分配CPU的工作内核 wor ...

  8. nginx.conf各参数的意义

    搬运+翻译至 http://qiita.com/syou007/items/3e2d410bbe65a364b603 /etc/nginx/nginx.conf 记录各个参数的意义 user user ...

  9. Nginx配置文件(nginx.conf)配置详解

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

  10. nginx配置文件nginx.conf超详细讲解

    #nginx进程,一般设置为和cpu核数一样worker_processes 4;                        #错误日志存放目录 error_log  /data1/logs/er ...

随机推荐

  1. 11、SpringMVC之文件下载和上传

    创建名为spring_mvc_file的新module,过程参考9.1节和9.5节 11.1.文件下载 11.1.1.创建图片目录并放置图片 11.1.2.页面请求示例 <a th:href=& ...

  2. 【Dubbo】构建SpringBoot整合Dubbo的Demo

    参考乐字节的Dubbo教程 https://www.bilibili.com/video/BV19L4y1n7YE Zookeeper单机部署 (Windows) 因为项目需要,这里我自己学习就采用Z ...

  3. 【Mybatis-Plus】06 代码生成器 CodeGenerator

    导入生成器需要的依赖坐标: <dependency> <groupId>com.baomidou</groupId> <artifactId>mybat ...

  4. Google的蛋白质结构预测项目代码(Demo)

    相关: Artificial Intelligence | 60 Minutes Full Episodes

  5. pytorch的显存释放机制torch.cuda.empty_cache()

    参考: https://cloud.tencent.com/developer/article/1626387 据说在pytorch中使用torch.cuda.empty_cache()可以释放缓存空 ...

  6. 中美在AI领域差距12个月

    看到一个新闻: <马斯克再谈AI:中美差距12个月> 其实想想这个评价也还中肯,尽管这些年国内AI大有弯道超车之势,但是不可否认的是由于欧美的历史领先优势和强大的科研及商业上的独立创新能力 ...

  7. baselines算法库的安装——Ubuntu20.04系统使用anaconda环境配置

    baselines算法库不做过多介绍,个人认为这是公开是所有reinforcement learning算法库中最权威的,虽然没有后期更新,也就是没有了学术界的state of the art ,  ...

  8. Dolphinscheduler Docker部署全攻略

    作者| 陈逸飞 Docker部署的目的是在容器中快速启动部署Apache Dolphinscheduler服务. 先决条件 docker-compose docker 使用容器单机部署Dolphins ...

  9. 关于Springboot理解

    面向对象五大基本原则 graph LR A(面向对象五大原则);B(单一职责原则);C(开放封闭原则);D(里式替换原则);E(依赖倒置原则);F(接口隔离原则); A---B;A---C;A---D ...

  10. 基于 token 的登陆系统的实现

    这是一段防爬代码块,我不介意文章被爬取,但请注明出处 console.log("作者主页:https://www.cnblogs.com/Go-Solo"); console.lo ...