Craft CMS Asked by dpayne on September 4, 2021
I’m trying to take a live / currently well functioning production site and create a local version. I downloaded all the files and the database and the site itself now works on my local device but whenever I try to access any of the admin pages to edit the site, I get a 404 page from Craft.
I replaced my entire craft/app folder to help ensure no corrupt file issues and that didn’t fix the problem. I also completely deleted the contents of my craft/storage/runtime folder to account for the potential download of temp files that could be confusing the local site and that didn’t fix it either.
The local site is running in dev mode and there is no error that shows on any of the admin pages, just a 404.
Any idea what’s going on here and possible fixes?
Thanks!
Goodness, I figured out what was going on here. The cpTrigger had been changed from admin to a different name in the craft/config/general file. [Facepalm]
Correct answer by dpayne on September 4, 2021
I am Ubuntu user so my solution will work well on Ubuntu and with apache not nginx I faced this issue so I did those steps which may help you:
inside it i put this block of configuration to tell apache that on port 80 I have server named with 'myserver.test' and the php code to be executed will be inside /var/www/html/craft/web
<VirtualHost *:80>
ServerName myserver.test
DocumentRoot /var/www/html/craft/web
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
where /var/www/html/craft/web was my path to 'web' folder inside 'craft' folder I created
And 'myserver.test' was my a local domain to allow me login to dashboard
then adding this line
127.0.0.1 myserver.test
<Directory /var/www/html/craft>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
where /var/www/html/craft is the path to the folder which I want the rewrite mod to work inside
at the end everything worked fine with me at http://myserver.test/.
Answered by Poode on September 4, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP