zoukankan      html  css  js  c++  java
  • nginx本地访问配置

    server {
    listen 80;
    server_name old.dmgcf.com;
    rewrite ^(.*) https://old.dmgcf.com$1 permanent;
    #location /nginx_status{
    #stub_status on;
    #access_log off;
    #allow 127.0.0.1;
    #allow 106.120.182.134;
    #deny all;
    #}
    }
    server {
    listen 443;
    server_name old.dmgcf.com;
    access_log logs/com.access.log main;
    error_log logs/com.error.log;
    ssl on;
    ssl_certificate /usr/local/nginx/conf/ssl/2019/server.cer;
    ssl_certificate_key /usr/local/nginx/conf/ssl/2019/server.key;
    ssl_session_timeout 5m;
    ssl_session_cache shared:SSL:1m;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;
    #location ~ /site/SendCode {
    # if ($http_referer ~ "https://old.dmgcf.com/site/SendCode") {
    # return 403;
    # }
    # proxy_pass http://.dmgcf.com:81;
    #}

    location / {
    root /data/web/redman;
    index index.html index.htm index.php;
    if (!-e $request_filename){
    rewrite ^/(.*) /index.php last;
    }
    }
    location ~ .php$ {
    root /data/web/redman;
    fastcgi_pass 172.17.10.153:9000;
    fastcgi_index index.php;
    fastcgi_connect_timeout 60;
    fastcgi_read_timeout 600;
    fastcgi_send_timeout 600;
    # # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }

    }
    server {
    listen 81;
    server_name www.dmgcf.com;
    access_log logs/access.log ;
    error_log logs/error.log;
    location / {
    root /data/web/redman;
    index index.html index.htm index.php;
    if (!-e $request_filename){
    rewrite ^/(.*) /index.php last;
    }
    if ($http_user_agent ~* "GTXs+LOL")
    {
    return 404;
    }
    }
    location ~ .php$ {
    root /data/web/redman;
    #fastcgi_pass 127.0.0.1:9000;
    fastcgi_pass 172.17.10.153:9000;
    #fastcgi_pass webpc;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
    }

  • 相关阅读:
    Echarts 中当y轴有负数时,让x轴下落在y轴最小值(转载)
    echarts中如何去掉柱状图的横线和竖线(转载)
    echarts 风向 风速曲线
    echarts legend.type scroll 显示问题;渲染错误
    css实现左侧固定宽度,右侧宽度自适应(转载)
    npm 如何查看一个包的版本信息?(转载)
    echart series areaStyle 颜色不显示
    Spark与Hadoop Shuffle对比
    hive中with...as...的用法
    [转]MyBatis
  • 原文地址:https://www.cnblogs.com/fangdecheng/p/10634703.html
Copyright © 2011-2022 走看看