mac nginx+ci ,lumen等网页开发环境配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac nginx+ci ,lumen等网页开发环境配置相关的知识,希望对你有一定的参考价值。

1、设置/ete/hosts:

把要访问的域名绑定到本地的端口

这样能保证我们登陆域名的时候,可以重定向到本地。

127.0.0.1       mobile.ymt360.com

127.0.0.1       my-uc-test.ymt360.com

127.0.0.1       localhost

255.255.255.255 broadcasthost

::1             localhost

~                         

 

2、nginx 配置+启动。

  安装nginx不细讲,主要讲配置(域名引用到对应的文件目录)

   1、配置server

server {

    listen 80;

    server_name mobile.ymt360.com;

    index index.php;

    root /data/www/website/mobile/public;

    access_log  /data/nginxlogs/mobile.ymt360.com.log;

    error_log /data/nginxlogs/mobile.ymt360.com.error;

    client_max_body_size 12m;

    error_page 502 /502.html;

 

    location / {

        index index.php;

        if (!-e $request_filename) {

            rewrite ^/(.+)$ /index.php/$1 last;

        }

    }

 

    location ~ ^/index\.php {

        set $path_info "";

        set $real_script_name $fastcgi_script_name;

        if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {

            set $real_script_name $1;

            set $path_info $2;

        }

        charset utf-8;

        fastcgi_param PATH_INFO $path_info;

        include fastcgi.conf;

    }

 

    location ~ .*\.php$ {

        deny all;

    }

}

php-fastcgi配置

这里路径用9000端口

以上是关于mac nginx+ci ,lumen等网页开发环境配置的主要内容,如果未能解决你的问题,请参考以下文章

Deepin nginx lumen配置

Lumen + nginx = 错误 500,重写或内部重定向循环,同时内部重定向到“/index.php”

lumen+nginx+405 not allow +跨域

通过浏览器访问 IP 地址时,在 nginx 上创建新的 Lumen 应用程序会抛出 404

当我尝试使用 nginx 连接到我的 lumen api 时返回 502

Lucid for mac 2.0.1 快速制作网页工具