How to change magento admin url and port, magento polish works

I installed varnish on my server which uses magento.

ports have changed so that now the varnish works on port 80, and magento works on 8080,

there are certain functions that will not work in the backend, as the URL is www.mystore.com/admin

but actually the store url is www.mystore.com:8080/admin

can someone help me change the backend port.

a function that doesn't work is a packing list for printing, where I change the port in javascript on the interface that it works. but there are many features, so I need more than a quick fix.

Thank you

+6
source share
3 answers

To change the admin URL, go to the backend, go to System > Configuration > Admin > Admin Base URL and change the setting. Use Custom Admin URL Yes and fill in the Custom Admin URL URL, including the port http://myDomain.com:8080/

If you want your own path, you can do the same with Use Custom Admin Path and Custom Admin Path

Then don't forget to do rm -rf in var / cache in magento dir.

And as mentioned above, do not use varnish for the administration area, perhaps you want to disable reports for users.

+7
source

You might want to consider turning off varnish for admin pages. Site administrators will probably not generate enough traffic to do anything serious for the database, and they deserve the most up-to-date information. In our varnish, we asked the varnish to pass (not cache) the page using /admin

+5
source

Here is an excerpt from our 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); } 

This can serve as an example for you.

+1
source

All Articles