#原配置

server {
listen ;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
root html;
index index.html index.htm;
} #error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:;
# 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 -s reload 重启

#user  nobody;
worker_processes ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} http {
include 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 logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout ;
keepalive_timeout ; #gzip on; server {
listen ;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
root html;
index index.html index.htm;
} #error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:;
# 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;
#}
} # another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen ;
# listen somename:;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

最新文章

  1. nodejs事件模块
  2. [参考]wget下载整站
  3. Android应用开发-网络编程(一)(重制版)
  4. Javascript.Reactjs-5-prop-validation-and-proptypes
  5. JavaScript MVC框架和语言总结[infoq]
  6. static const vs. extern const
  7. xunsearch安装配置
  8. 关于JavaScript的思考
  9. JS代码的简单重构与优化
  10. javaEE学习笔记-单例模式
  11. 从小白进阶ubuntu高手的必经之路—命令
  12. ContentProvider初阶Cookbook
  13. POJ 1113 Wall 求凸包的两种方法
  14. Row Cache Objects
  15. MAC的VIMRC
  16. Spring------生命周期
  17. nginx+python+windows 开始_02
  18. bzoj千题计划307:bzoj5248: [2018多省省队联测]一双木棋
  19. How to fix "FAILURE DURING CONVERSION TO COFF: FILE INVALID OR CORRUPT"
  20. 查看Linux操作系统位数

热门文章

  1. 八 个优秀的 jQuery Mobile 教程
  2. qemu-img管理虚拟机
  3. ios软件设计中注意点
  4. P2261 bzoj1257 [CQOI2007]余数求和
  5. 利用Resttemplate进行put请求
  6. JS原生增删,判断class是否存在方法
  7. 【mysql】linux, mac mysql数据库root 密码忘记修改
  8. Python常见文件操作的函数示例
  9. LeetCode(121) Best Time to Buy and Sell Stock
  10. Python基础之(判断,循环,列表,字典)