一、安装报404错误

git clone 下最新代码,跳转到index/install 安装时出现404错误

需要把伪静态规则加到nginx配置文件中:

#
# The default server
#
server {
listen ;
#server_name _; #charset koi8-r; #access_log logs/host.access.log main; # Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf; location / {
root /usr/share/nginx/html/hoh;
index index.php index.html index.htm;
try_files $uri $uri/ @handler; ## If missing pass the URI to Magento’s front handler
#add_header Access-Control-Allow-Origin *;
expires 30d; ## Assume all files are cachable
}
## These locations would be hidden by .htaccess normally
location /app/ { deny all; }
location /includes/ { deny all; }
location /lib/ { deny all; }
location /media/downloadable/ { deny all; }
location /pkginfo/ { deny all; }
location /report/config.xml { deny all; }
location /var/ { deny all; } location /var/export/ { ## Allow admins only to view export folder
auth_basic "Restricted"; ## Message shown in login window
auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
autoindex on;
}
location /. { ## Disable .htaccess and other hidden files
return 404;
}
location @handler { ## Magento uses a common front handler
rewrite / /index.php;
}
location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
rewrite ^(.*.php)/ $1 last;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /usr/share/nginx/html/hoh;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

重启nginx后正常安装。

二、后台404错误

1.检查后台地址是否输入错误

打开app/etc/local.xml

<frontName><![CDATA[admin]]></frontName>

那么后台登陆地址就是 域名/admin

2.如果后台地址无误,执行下面sql语句,表名根据自身是否有加前缀

SET FOREIGN_KEY_CHECKS=;
UPDATE `core_store` SET store_id = WHERE code='admin';
UPDATE `core_store_group` SET group_id = WHERE name='Default';
UPDATE `core_website` SET website_id = WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=;

3.删除 var文件夹下cache文件夹和session文件夹下的所有内容

最新文章

  1. [AlwaysOn Availability Groups]SQL Server错误日志(AG)
  2. ILGenerator.Emit动态 MSIL编程(二)之基础
  3. git 远程仓库 轻松创建
  4. WPF学习之路(七)应用程序和窗口
  5. [moka学习笔记]yii2设置语言和时区
  6. Oracle数据库和DB2数据库分页SQL的区别举例
  7. jQuery checkbox相关
  8. 基于AppCan MAS系统,如何轻松实现移动应用数据服务?
  9. LVS测试小结
  10. 【js 编程艺术】小制作二
  11. struts加载spring
  12. Oracle 高水位线和全表扫描
  13. 使用git工具快速push项目到github(精简)
  14. 检查linux版本命令
  15. 从Facebook数据泄露事件看大数据时代的个人信息安全问题
  16. Linux 防火墙相关
  17. redis服务部署脚本
  18. ubuntu中chown设置文件权限
  19. django 用户管理相关的表
  20. 【转载】Multiboot规范

热门文章

  1. 一步一步拆解一个简单的iOS轮播图(三图)
  2. 图片上传插件ImgUploadJS:用HTML5 File API 实现截图粘贴上传、拖拽上传
  3. 【翻译】设计模式学习系列1---【Design Patterns Simplified: Part 1【设计模式简述:第一部分】】
  4. ActiveX(一)第一个简单的Demo
  5. .Net(c#)加密解密之Aes和Des
  6. bootstrap-简单实用的垂直手风琴滑动菜单列表特效
  7. Git避免输入用户名和密码
  8. 把生成的excel文件直接提供为下载页效果
  9. Android Studio创建AVD
  10. MySQL 相关总结