简体   繁体   English

如何更改magento admin url和port,magento运行清漆

[英]how to change magento admin url and port , magento running varnish

I have installed varnish on my server which uses magento. 我在我的服务器上安装了使用magento的清漆。

the ports have changed so that varnish now runs on port 80 and magento runs on 8080, 端口已更改,以便清漆现在在端口80上运行,magento在8080上运行,

there are certain features that will not work in the backend as the url is www.mystore.com/admin 有些功能在后端不起作用,因为网址是www.mystore.com/admin

but in fact the url to the store is www.mystore.com:8080/admin 但实际上商店的网址是www.mystore.com:8080/admin

can anyone help me change the backend port. 任何人都可以帮我改变后端端口。

the feature that is not working is print packing slip, where i change the port in the javascript on the frontend it works. 不起作用的功能是打印装箱单,我在其前端的javascript中更改端口。 but there are tons of features so i need more than a quick fix 但是有很多功能所以我需要的不仅仅是快速修复

thank you 谢谢

To change the admin url you go to the backend, go to System > Configuration > Admin > Admin Base URL and change the setting Use Custom Admin URL to Yes and fill out Custom Admin URL with the URL including the port http://myDomain.com:8080/ 要更改管理URL,请转到后端,转到System > Configuration > Admin > Admin Base URL ,并将设置Use Custom Admin URL更改为是,并使用包含端口http:// myDomain的URL填写Custom Admin URL 。 COM:8080 /

if you want your own path, you can do the same with Use Custom Admin Path and Custom Admin Path 如果您想要自己的路径,可以Use Custom Admin Path和“ Custom Admin Path

Afterwards don'T forget to do a rm -rf on var/cache in magento dir. 之后不要忘记在magento目录中对var / cache执行rm -rf。

And as the others already mentioned, don't use varnish for the admin area, maybe you want to deactivate the reports for the users. 正如其他人已经提到的那样,不要在管理区域使用清漆,也许您想要为用户停用报告。

You may want to consider disabling Varnish for the Admin pages. 您可能需要考虑为Admin页面禁用Varnish。 The Administrators of the site probably won't generate enough traffic to do anything serious to the database and they deserve to have the most up to date information. 该站点的管理员可能不会产生足够的流量来对数据库做任何严肃的事情,他们应该拥有最新的信息。 In our Varnish, we told varnish to pass through (don't cache) pages with /admin 在我们的Varnish中,我们告诉varnish通过/admin来传递(不要缓存)页面

Here is an excerpt from our varnish.vcl: 以下是我们的varnish.vcl的摘录:

# Don't cache pages for Magento Admin
# FIXME: change this rule if you use custom url in admin
if (req.url ~ "^/(index.php/)?admin") {
    return(pass);
}

# Don't cache checkout/customer pages, product compare
if (req.url ~ "^/(index.php/)?(checkout|customer|catalog/product_compare|wishlist)") {
    return(pass);
}

It might serve as an example for you. 它可以作为你的一个例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM