nginx.conf
server
{
듣기 80;
server_name cy.280878.com;
root /home/www/cy.280878.com;
index index.php index1.php index.htm index.html;
#location / {
# if ( -f $request_filename) {
# break;
# }
# if ( !-e $request_filename) {
# 다시 작성 ^(.*)$ /index.php/ 마지막 $1;
# break;
# }
# }
위치 ~ .+.php($|/) {
#fastcgi_pass unix:/dev/shm/php -cgi.sock;
fastcgi_pass 127.0.0.1: 이 fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/ nginx/fastcgi_params;
}
}
.htaccess
Options +FollowSymlinks -Multiviews
RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !- f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
首页:
http://cy.280878.com/newswork/