zoukankan      html  css  js  c++  java
  • nginx 基本配置

    server {
    listen 80;
    server_name 域名;
    #access_log /var/log/nginx/admin.log;
    index index.html index.htm index.php;
    root 项目路径;
    if ( $query_string ~* ".*[;'<>].*" ){
    return 404;
    }

    location / {
    try_files $uri $uri/ /index.php;
    }

    location ~ .*.(php|php5)?$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~ .*.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
    expires 30d;
    }

    location ~ .*.(js|css)?$ {
    expires 7d;
    }
    }

  • 相关阅读:
    画了朵花
    定位
    浮动
    盒模型
    html+css笔记1
    闭包
    高阶函数
    函数
    Map Set iterable
    git stash clear/drop 后代码如何恢复
  • 原文地址:https://www.cnblogs.com/myJuly/p/10008471.html
Copyright © 2011-2022 走看看