Linux/nginx/php-zend
提供: 初心者エンジニアの簡易メモ
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|gif|png|swf|css|js|inc|ico|pdf|flv|gz|html|htm|txt|xml)$ { root /var/www/zend/sample1/public; index index.html; ssi on; access_log off; 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