zoukankan      html  css  js  c++  java
  • windows下wnmp配置

    windows下面apache结合laravel会出现env文件公用的问题,太麻烦,就换用nginx。问题:https://github.com/vlucas/phpdotenv/issues/219

    1.我直接下载openresty的windows版本,启动

    2.进入到php目录:php-cgi.exe -b 127.0.0.1:9000

    3.openresty的conf文件夹,nginx.conf文件增加include vhosts/*.conf ,vhosts文件配置如下:

    server {
        listen 80;
        server_name ac1.api.axd.com;
        root D:webservicephpgitlab.aixiangdao.comac1.apipublic;
        index index.html index.htm index.php;
       
        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";
    
    
        charset utf-8;
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
    
        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }
    
        #error_page 404 /index.php;
    
        location ~ .php$ {
            fastcgi_split_path_info ^(.+.php)(/.+)$;
            #fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
    
        location ~ /.(?!well-known).* {
            deny all;
        }
    }
    
    
  • 相关阅读:
    0x05 排序
    bzoj3032: 七夕祭
    0x04 二分
    bzoj2783: [JLOI2012]树
    bzoj3192: [JLOI2013]删除物品
    bzj1106: [POI2007]立方体大作战tet
    POJ2299Ultra-QuickSort
    POJ3080Blue Jeans
    POJ3253Babelfish
    POJ1611The Suspects
  • 原文地址:https://www.cnblogs.com/mentalidade/p/9708889.html
Copyright © 2011-2022 走看看