Running Yii Using Nginx, Javascript Files Are Not Loaded

Hi All,

Greetings!

I recently tried to use nginx as my server for my yii application. I was able to setup nginx and other needed application. I also used the http://www.yiiframework.com/doc/guide/1.1/en/quickstart.apache-nginx-config as reference for my nginx configuration. I got it working but when I viewed my site, I observed that it only load css files, images but some of js files are not loaded, for example the jquery.js, fyi my setup is working in apache. If you have any idea or a version of nginx config that works in your setup. It is much appreciated.

Hi

Could you please look at your page source code and say what path it tries to use to load jquery.js?

Also please show what you’ve got in your nginx config.

thank you.

Hi Belitsoft,

Thanks for replying. I don’t know why but I compressed my web app directory using ftp and unzip it. That’s where I encountered the issue. Then I tried directly uploading the web app directory and it works. All js files are now loaded.