location ^~ /laravel {
alias /usr/share/nginx/html/laravel/public;
try_files $uri $uri/ @laravel;
location ~ \.php {
root /usr/share/nginx/html/laravel/public;
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
location @laravel {
rewrite /laravel/(.*)$ /laravel/index.php?/$1 last;
}
chmod +x /etc/init.d/php7.0-fpm
service php7.0-fpm status
● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled)
Active: active (running) since Mon 2016-08-08 09:32:50 UTC; 15min ago
Docs: man:php-fpm7.0(8)
Main PID: 662 (php-fpm7.0)
Status: "Processes active: 0, idle: 2, Requests: 10, slow: 0, Traffic: 0req/sec"
CGroup: /system.slice/php7.0-fpm.service
├─662 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
├─721 php-fpm: pool www
└─722 php-fpm: pool www