Вариант 1
'urlManager'=>array(
'urlFormat'=>'path',
'baseUrl' => '/~abcd', // <-- имя вашей директории, куда перенесён проект
'rules'=>array(
// стандартное правило для обработки '/' как 'site/index'
'' => 'site/index',
'user/<action:.*>'=>'user/<action>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
'showScriptName' => false
),
Вариант 2
server {
listen 80;
charset utf-8;
set_real_ip_from 127.0.0.1;
real_ip_header X-Real-IP;
root /path/to/~abcd; # <-- полный путь к вашей директории, куда перенесён проект
location / {
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(.*)$;
#let yii catch the calls to unexising PHP files
set $fsn /index.php;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}
# With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
#fastcgi_pass unix:/tmp/php-fastcgi.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
#PATH_INFO and PATH_TRANSLATED can be omitted, but RFC 3875 specifies them for CGI
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
}
}