「Linux/nginx/php-zend」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→php-fpmでzendを動かす時のサーバ設定) |
|||
(同じ利用者による、間の3版が非表示) | |||
行11: | 行11: | ||
} | } | ||
} | } | ||
− | location ~* \.(jpg|gif|png|swf|css|js|inc|ico|pdf|flv|gz|html|htm|txt|xml)$ { | + | location ~* \.(jpg|jpeg|gif|png|swf|css|js|inc|ico|pdf|flv|gz|woff|html|htm|txt|xml)$ { |
root /var/www/zend/sample1/public; | root /var/www/zend/sample1/public; | ||
index index.html; | index index.html; | ||
ssi on; | ssi on; | ||
+ | access_log off; | ||
break; | break; | ||
} | } |
2016年7月12日 (火) 16:09時点における最新版
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|jpeg|gif|png|swf|css|js|inc|ico|pdf|flv|gz|woff|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