facebook twitter hatena line email

「Linux/nginx/php-zend」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(ページの作成:「==php-fpmでzendを動かす時のサーバ設定== */etc/nginx/conf.d/sample1.localhost.conf server { listen 80; server_name sample1.localhost; root...」)
 
行11: 行11:
 
         }
 
         }
 
     }
 
     }
     location ~ .*\.(jpg|JPG|gif|GIF|png|PNG|swf|SWF|css|CSS|js|JS|inc|INC|ico|ICO) {
+
     # location ~ .*\.(jpg|JPG|gif|GIF|png|PNG|swf|SWF|css|CSS|js|JS|inc|INC|ico|ICO) {
 +
    location ~* \.(jpg|gif|png|swf|css|js|inc|ico) {
 
       root    /var/www/zend/sample1/public;
 
       root    /var/www/zend/sample1/public;
 
       index  index.html;
 
       index  index.html;

2015年5月21日 (木) 05:39時点における版

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) {
   location ~* \.(jpg|gif|png|swf|css|js|inc|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