Ubuntu Server 16.04.4 LTS + Nginx + PHP 7.0

Ubuntu Server 16.04.4 LTS + Nginx + PHP 7.0

TONYLABS 02 Mar, 2019

Install Nginx

$ sudo echo "deb http://nginx.org/packages/mainline/ubuntu/ `lsb_release -cs` nginx" >> /etc/apt/sources.list
$ sudo echo "deb-src http://nginx.org/packages/mainline/ubuntu/ `lsb_release -cs` nginx"  >> /etc/apt/sources.list
$ sudo curl http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install nginx

Install PHP7.0

$ apt install php7.0-fpm php7.0-mysql php7.0-cli php7.0-xml php7.0-gd php7.0-curl php7.0-ldap php-soap php7.0-mcrypt php7.0-mbstring php7.0-zip unzip
$ nano /etc/php/7.0/fpm/php.ini

找到cgi.fix_pathinfo选项,去掉注释, 将值设置为0:

cgi.fix_pathinfo = 0;

Open the xdebug.ini file:

$ nano /etc/php/7.0/fpm/conf.d/20-xdebug.ini

xdebug.remote_handler=dbgp xdebug.remote_mode=req
xdebug.remote_host= xdebug.remote_port=9000

Like what you're reading? Subscribe to our top stories.

We will continue to update Front; if you have any questions or suggestions, please contact us!

Follow us on Medium, Twitter, Facebook, YouTube, and Dribbble.

Image Description
Written by

Hanna Wolfe

I create advanced website builders made exclusively for web developers.


  • Image Description
    Dave Austin 1 day ago

    As a Special Education teacher this resonates so well with me. Fighting with gen ed teachers to flatten for the students with learning disabilities. It also confirms some things for me in my writing.

    • Image Description
      Hanna Wolfe 1 day ago

      Love it Dave! We're all about keeping it up.

  • Image Description
    Christina Kray 2 days ago

    Since our attention spans seem to be shrinking by the day — keeping it simple is more important than ever.


Post a comment

Stay in the know

Get special offers on the latest developments from Front.