DEBIAN8 Deployment Laravel 5.3 (php7.0 + nginx)

Source: Internet
Author: User

Web root directory:/var/www/html

Replace the Apt-get source
Cd/etc/apt/sources.list
Deb Http://ftp.debian.org/debian Jessie Main contrib Non-free
Deb Http://ftp.debian.org/debian jessie-updates main contrib Non-free
Deb http://security.debian.org jessie/updates main contrib Non-free
Deb http://packages.dotdeb.org Jessie All
Deb Http://ftp.debian.org/debian jessie-backports Main

Update Apt-get Source
Apt-get Update

Installing composer
Apt-get Install composer

New Laravel Project
Cd/var/www/html
Composer Create-project Laravel/laravel app--prefer-dist
Chmod-r 755 App
CD app
Chmod-r 777 Bootstrap
CHMOD-R 777 Storage

Installing php7.0
Apt-get PHP php-fpm

Installing Nginx
Apt-get Nginx

Edit PHP.ini
Vim/etc/php/7.0/fpm/php.ini
; cgi.fix_pathinfo=1 modified to Cgi.fix_pathinfo=0

Edit Nginx Configuration
Vim/etc/nginx/sites-enabled/default

server {
Listen 80;

server_name app.com; #你的域名
Root/var/www/html/app/public;
Index index.php;

Location/{
Try_files $uri $uri//index.php? $query _string;
}

Location ~ \.php$ {
Try_files $uri/index.php = 404;
Fastcgi_split_path_info ^ (. +\.php) (. *) $;
Fastcgi_pass Unix:/var/run/php/php7.0-fpm.sock;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
}


Location ~/\.ht {
Deny all;
}

}



Hey, MySQL self-installing, and PHP-related extensions

DEBIAN8 Deployment Laravel 5.3 (php7.0 + nginx)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.