drnf593779 2013-08-10 19:03
浏览 150

使用nginx服务器找不到Yii应用程序404

I tried to run the yii application on my vps which is installed with nginx as a server. but when I access my domain: www.domain.com, pages appear fine but if one link is always accessed 404 not found error. Is there something wrong with my nginx settings?

My nginx configuration :

server {
listen       80;
server_name  www.mydomain.com;

   location / {
       root   /usr/share/nginx/html;
       index  index.php index.html index.htm;
   }

   error_page   500 502 503 504  /50x.html;
   location = /50x.html {
       root   /usr/share/nginx/html;
   }

    location ~ \.php$ {
       root           /usr/share/nginx/html;
       fastcgi_pass   127.0.0.1:9000;
       fastcgi_index  index.php;
       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
       include        fastcgi_params;
   }

}
  • 写回答

1条回答 默认 最新

  • dou72260 2013-08-10 20:16
    关注

    below the index line add this line

    try_files $uri $uri/ /index.php$request_uri;
    
    评论

报告相同问题?

悬赏问题

  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭