美文网首页
lnmp之nginx配置文件

lnmp之nginx配置文件

作者: zhaoyanping | 来源:发表于2020-04-04 12:49 被阅读0次
    server {
            listen       80;
            server_name  myhost.cn;
     
            location / {
                root   /User/Mac/www/myhost.cn;
                index  index.html index.htm index.php;
                if ( !-e $request_filename ) {
                    rewrite ^/(.*)? /index.php?/$1 last;
                    break;
                }
            }
     
            location ~ \.php$ {
                root /User/Mac/www/myhost.cn;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }
     
            error_log /www/logs/myhost.cn_error.log;
            access_log /www/logs/myhost.cn_access.log main;
    }

    相关文章

      网友评论

          本文标题:lnmp之nginx配置文件

          本文链接:https://www.haomeiwen.com/subject/umadphtx.html