我目前在Magento中使用nginx,我使用map指令来提供这样的商店代码: map $http_host $magecode { www.store.com retail_store; wholesale.store.com wholesale_store; beta.store.com retail_beta_view; } 这样做的缺点是,如果我testing网站是自己的商店,我不能使用相同的目录。 相反,我想使testing版网站,而不是商店 。 是否可以同时映射两个variables? 我想象它会是这样的: map $http_host $magecode $magetype { www.store.com retail_store website; wholesale.store.com wholesale_store website; beta.store.com retail_beta_view store; } 如果不是,我可以映射相同的variables两次? map $http_host $magecode { … } map $http_host $magetype { … }
我试图找出我真正需要运行Magento的Apache模块。 有没有一种简单的方法来找出我需要哪些模块,所有这些加载模块? 服务器正在使用以下模块(据我所知): rewrites deflate log header ssl auth vhost expires mime dir alias 现在我们已经加载了所有这些: core_module (static) so_module (static) http_module (static) mpm_prefork_module (static) authn_file_module (shared) authn_core_module (shared) authz_host_module (shared) authz_groupfile_module (shared) authz_user_module (shared) authz_core_module (shared) access_compat_module (shared) auth_basic_module (shared) socache_shmcb_module (shared) buffer_module (shared) reqtimeout_module (shared) ext_filter_module (shared) request_module (shared) include_module (shared) filter_module (shared) substitute_module (shared) […]
我在nginx上运行magento。 我的根是/pub 但有一些扩展试图链接到www.myurl.com/pub/xxx.file ,所以我想要将所有/pub改写为/ 我的计划是www.myurl.com/pub/xxx.file成为www.myurl.com/xxx.file ,但它不起作用。 这里是我的conf文件( abcdefg是一个testing目录): server { listen 443 ssl http2; server_name www.myurl.com ; index index.html index.htm index.php default.html default.htm default.php; root /home/wwwroot/www.myurl.com/pub; ssl on; ssl_certificate /etc/letsencrypt/live/www.myurl.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/www.myurl.com/privkey.pem; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers "myciphers"; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem; location /pub { rewrite /pub /; } location […]
我试图安装一些Magento扩展,但它保持超时。 当我通过ISA Server 2004运行跟踪时,我看不到任何被拒绝的stream量。 我唯一得到的是一个http代理closures状态: 其中一个对等方发送RST段后,连接被中止closures。 我不能告诉我需要打开什么,因为HTTP和HTTPS都是允许的。 干杯
需要build议共享主机将运行Magento社区快速或其他一些不昂贵的解决scheme。 这个网站不会有很多用户,我只需要它可以同时运行100-20个用户。 magento的问题是使这个系统非常慢的数据库devise,也是其他人员不是最好的。 我以前的网站有hostmonster.com和justhost.com,但对于不在美国(我的客户地区:亚洲,非洲)的单个用户来说速度还不够快。 涉及数据库的每个操作都需要很多时间。 谢谢
由于某些原因,当地时间上午5-6点的大部分星期天Apache无法正常工作。 我无法find原因,而且卡在故障排除中。 我使用SSL证书在Apache2上运行Magento,并在该特定时间周围随机页面停止运行,导致没有下订单。 有时候是分类页面,有时候是pipe理区域。 我认为这可能是循环,但不知道如何进一步排除故障。 这是我过去两个星期天的Apache错误日志: 1月29日 /var/log/apache2/error.log.1:[Sun Jan 29 00:35:21 2012] [错误]服务器达到MaxClients设置,考虑提高MaxClients设置 /var/log/apache2/error.log.1:[Sun Jan 29 00:39:44 2012] [错误] [客户端66.87.100.194]请求失败:读取头文件时出错 /var/log/apache2/error.log.1:[Sun Jan 29 06:25:21 2012] [notice]请求平稳重启,重启 —注意新的日志文件 /var/log/apache2/error.log:[Sun Jan 29 06:25:24 2012] [notice] Apache / 2.2.16(Debian)PHP / 5.3.3-7 + squeeze1与Suhosin-Patch mod_ssl / 2.2。 16configuration了OpenSSL / 0.9.8o – 恢复正常操作 /var/log/apache2/error.log:[Sun Jan 29 06:26:00 2012] [notice] child […]
我的问题是,可以做些什么来防止在mysql数据库中的恶意search短语? search字词spamming示例: guayabera en espa a//?option=com_product//catalog/seo_sitemap/account//index2.php?option=c 我想在PHP中通过阻止查询? 字符。 或者,也许只是简单地阻止使用searchfunction的IP地址。 有没有更好的办法?
我尝试使用iptables来保持端口8080上的Varnish和端口80上的Apache,并且只是将端口80上的所有内容都路由到端口8080.它不工作。 当我在端口8080上调用站点时,所有内容都被caching,当我在端口80上调用它时,我只是得到了正常的Apache响应。 我遵循这个指南。 所以Varnish和Apache似乎configuration正确,因为我收到端口8080上的caching版本。 在第1步中,我只是将规则添加到iptables中: #iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp –dport 80 -j REDIRECT –to-ports 8080 当我打电话 #iptables -L -t nat 看看它是否工作,我收到这个输出: Chain PREROUTING (policy ACCEPT) target prot opt source destination REDIRECT tcp — anywhere anywhere tcp dpt:http redir ports 8080 Chain POSTROUTING (policy ACCEPT) target prot opt source […]
我目前有我们的Magento网站redirecthttp到https。 基本上只能通过https访问网站,包括www。 我认为这是工作,但是,它目前显示为302redirect,我想把它做成301.有人可以让我知道如何得到这个工作? 我使用.htaccess尝试了一些不同的东西,但没有运气。 事实上,当301redirect在我们现有的redirect工程的.htaccess文件中,而是直接进入主页时,这是我的主要问题。 # Redirect all "not correct" domain to www with https # (is not important if comes with or without https): RewriteCond %{HTTP_HOST} !^www.gloveclub.co.uk$ [NC] RewriteRule ^(.*)$ https://www.gloveclub.co.uk/$1 [L,R=301] # Redirect all non-ssl to ssl. RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.gloveclub.co.uk/$1 [R,L] 我原来的.htaccess文件内容如下; ############################################ ## uncomment these lines for CGI mode […]
在我们的Magento商店中,当我们尝试去pipe理部分中的产品页面上传图片时,我们看到我们已经在前端存在的图片丢失了,没有选项可以照常添加图片。 我们正在Nginx和HHVM上运行该网站。 我检查了/var/log/nginx/error.log ,我看到这个错误: 2015/07/16 11:16:25 [error] 21444#0: *14929 access forbidden by rule, client: 127.0.0.1, server: www.store.com, request: "POST /app/etc/local.xml HTTP/1.1", host: "www.store.com" HHVM错误日志中没有任何内容,不确定在这里做什么。