nginx配置方法:
location ~ \.php$ { fastcgi_pass unix:/dev/shm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /opt/www_data/code/public_html$fastcgi_script_name; include fastcgi_params; }
5.2.xx版本php
php-fpm配置方法:
/dev/shm/php-fpm.sock
5.3.xx版本php
listen = /dev/shm/php-cgi.sock
注:这里(/dev/shm)socket在内存中了,用来提高速度。