Yii 302 redirects all requests to localhost to remote server

I migrated my local development from a windows PC to Ubuntu and I didn’t change any settings on Yii. But when I visit http://localhost, every requests are redirected to my server index page(http://www.xxx.com/). In windows, however, http://localhost will be redirect to http://www.xxx.com but localhost/controller/view will not. Now all requests to Yii are redirected to server(other documents in web root path that don’t run through Yii’s bootstrap index.php are not redirected). What probably caused this?

Here’s my protected/config/main.php:


return array(





    // preloading 'log' component


    // autoloading model and component classes












    // application components















            'connectionString' => 'mysql:host=localhost;dbname=xxx',


            'emulatePrepare' => true,

            'username' => 'xxx',

            'password' => 'xxx',

            'charset' => 'utf8',





                array('host'=>'', 'port'=>11211, 'weight'=>60),

               array('host'=>'', 'port'=>11211, 'weight'=>40),



        /*'session' => array (


            'class' => 'system.web.CDbHttpSession',

            'connectionID' => 'db',

            'autoCreateSessionTable' => FALSE,

            'timeout' => 7200,

            'cookieMode' => 'allow',

            'cookieParams' => array(

                'path' => '/',

                'domain' => '.xxx.com',

                'httpOnly' => TRUE,








            // enable cookie-based authentication





            // use 'site/error' action to display errors








                    'levels'=>'error, warning',


                //uncomment the following to show log messages on web pages

                 // array(

                      // 'class'=>'CWebLogRoute',

                  // ),   




    // application-level parameters that can be accessed

    // using Yii::app()->params['paramName']


        // this is used in contact page