LNMP是一个在LINUX上的集成环境安装包,功能强大实用,简化程序环境搭配流程,极大的方便了用户使用。如果在lnmp上安装需要按照以下思路操作
1.magengto就是类似网店:
配置nginx
server {
server_name magento.localhost.com;
root /mysite/magento;#一定要指定magento的根目录
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
# set a nice expire for assets
location ~* "^.+\.(jpe?g|gif|css|png|js|ico|pdf|zip|tar|t?gz|mp3|wav|swf)$" {
expires max;
add_header Cache-Control public;
}
# the downloader has its own index.php that needs to be used
location ~* ^(/downloader|/js|/404|/report)(.*) {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$1/index.php$1;
fastcgi_read_timeout 600;
fastcgi_pass 127.0.0.1:9000;
}
location ~* \.php {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 600;
fastcgi_pass 127.0.0.1:9000;
}
}
2.修改php.ini中的
max_execution_time = 600 #默认30秒
max_input_time = 300 #默认30秒
否则报错:you.......number:1234564556
若需要查看错误的详细信息:
只需要:magento/error目录下把 local.xml.sample改名为local.xml
刷新网页,即可查看详细的错误信息。
3.重装magento
需要先备份好你的数据,清空数据库;
删除magento/var/session目下的缓冲文件
删除magento\app\etc目录下的local.xml文件
4.重新输入IP或域名,即可安装magento成功
(责任编辑:最模板) |