Linux/nginx/php-zend
提供: 初心者エンジニアの簡易メモ
2015年5月20日 (水) 11:57時点における36.55.238.17 (トーク)による版 (ページの作成:「==php-fpmでzendを動かす時のサーバ設定== */etc/nginx/conf.d/sample1.localhost.conf server { listen 80; server_name sample1.localhost; root...」)
php-fpmでzendを動かす時のサーバ設定
- /etc/nginx/conf.d/sample1.localhost.conf
server {
listen 80;
server_name sample1.localhost;
root /var/www/zend/sample1/public;
index index.php index.html;
location / {
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
}
location ~ .*\.(jpg|JPG|gif|GIF|png|PNG|swf|SWF|css|CSS|js|JS|inc|INC|ico|ICO) {
root /var/www/zend/sample1/public;
index index.html;
ssi on;
break;
}
location ~ \.php$ {
root /var/www/zend/sample1/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param APPLICATION_ENV development;
}
参照
http://koji27.cocolog-nifty.com/chat/2013/08/conoha-vps-cent.html
