0

Was having problems yesterday with my server, which the community seemed to think were irreparable, so I decided to rebuild it.

Set up a LAMP stack with Redis and re-installed magento. Used my existing database, imported images from the old server and everything was working fine, after a little troubleshooting.

My Redis installation was only being used for session storage, because magento's documentation doesn't make it clear whether a password can be used with redis for other types of storage. I managed to find a walkthrough which gives an example of the env.php file, including passwords for redis default and full page cache. I applied this solution and it appeared to be working last night, but when I attempted to access the admin panel this morning I faced an error.

The public folder of my server is a symlink to [magento_install_dir]/pub.

The base URL is set as follows: http://mywebsite.com/.

Media URL is: {{base_url}}media/.

Static URL is: {{base_url}}static/.

Backend frontname is: admin

For some reason, when I type http://mywebsite.com/admininto the address bar and push enter, I am redirected to the url http://index.php/admin/http:/index/index/index.php/admin/admin/index/index/key/03d43f5c1cec52b7033fd3be4383c7b908e3cf223f94f70edc6c1a3ba682d11f/%3FSID%3D5jmbrv35q7tt5e8kostgr8ijjr/key/4f38776e3016c76ef23af1805de97c2ebf5380684631e4ae24a4506ada844975/?SID=5jmbrv35q7tt5e8kostgr8ijjr

So, for some reason, the base URL either isn't being added, or is being interpreted as /index.php. Also, the second repetition of the url includes two instances of admin/, which makes me think that maybe the backend frontname that I have defined is being appended with the default. I could perhaps troubleshoot this issue, but I can't work out why the URL is not prepended with the site's base URL.

1

I had a similar issue when setting up a docker.

The following command resolved the issue:

Ubuntu server

chown -R :www-data /[path]/[to]/[magento]/[root]/[folder]

CentOS server

chown -R :apache /[path]/[to]/[magento]/[root]/[folder]

Afterwards, I cleared Magento's cache and flushed Redis. Hope this helps!

  • I honestly cant remember how I solved this. I will accept this answer, though I personally always have problems assigning ownership to the www-data user. I will edit your answer to provide a bit more compatibility. – Joshua Flood May 4 at 18:45
  • Thanks for improving my answer :) – Mike Dubs May 5 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.