zoukankan      html  css  js  c++  java
  • Ubuntu 17 Nginx 配置 laravel 运行环境

    1 安装 nginx

    #aptitude install nginx

    #apatitude install php7.1-fpm

    2 在 /etc/nginx/sites-available 建立 semis.conf 如下:

    server {
             listen 80;
             listen [::]:80;

            server_name semis.test;

            root /var/www/app/semis/webroot/public;
             index index.php;

            location / {
                     #try_files $uri $uri/ =404;
                     try_files $uri $uri/ /index.php?$query_string;
             }

            location ~ .php$ {
                     include snippets/fastcgi-php.conf;
                     fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
             }

    }

    3 如果 Laravel 是5.5 版本,可以不加下页这行(估计是 public/.htaccess 文件生效了)

    try_files $uri $uri/ /index.php?$query_string;

  • 相关阅读:
    CCNA 6.9
    CCNA 6.5
    Google search
    CCNA 4.14 TP Correction
    CCNA 6.3
    CCNA 6.6
    有关 英语学习的一些网站
    法语学习笔记
    垃圾邮件分类(Scala 版本)
    SQL 面试经典问题 行列互相转化
  • 原文地址:https://www.cnblogs.com/mouseleo/p/8776452.html
Copyright © 2011-2022 走看看