grav-learn icon indicating copy to clipboard operation
grav-learn copied to clipboard

When installing from the ZIP with admin, error 404

Open tigerblue77 opened this issue 4 years ago • 6 comments

Hello,

I followed your doc here : https://getgrav.org/downloads and here : https://learn.getgrav.org/16/basics/basic-tutorial

I saw the page with php extensions missing, I installed them and so the webpage dissapeared and now I am always redirected to localhost/admin with "error 404 not found"... You're app is not really plug and play ^^

tigerblue77 avatar Nov 21 '20 16:11 tigerblue77

Did you install “Grav Core” or “Grav Core + Admin”?

Can you reach just localhost? If that’s the case you have issues with your routing. Try looking at the troubleshooting for 404 here: https://learn.getgrav.org/16/troubleshooting/page-not-found

Also what server/web server/php versions are you running?

w00fz avatar Nov 21 '20 16:11 w00fz

Sorry for the lack of infos

"Grav Core + Admin"

Nope I can't, it redirects me to /admin all te time

I'm using Apache2 and PHP 7.3 : image

tigerblue77 avatar Nov 21 '20 16:11 tigerblue77

That redirect happens because it's the first time load and the admin plugin is trying to get you to register your administration user. It is definitely working as intended but something is causing that 404.

My question to you is if the 404 error you are getting looks like a well styled 404 page with a "Whoops" in it or if it's the default plain web server 404 error.

If it is the latter that is definitely an issue with the htaccess, in which case you should make sure you have a .htaccess at the root of your site and the webserver and vhost configured accordingly to work with it (see my troubleshooting link above).

If it is the former, try having a look at the logs in logs/grav.log and see if there's anything obvious going on.

w00fz avatar Nov 21 '20 17:11 w00fz

Well... Sorry I'm bad, here is what I've done to make it work (should be in documentation instead of troubleshooting) :

# Place Grav files in webroot
cd /var/www/html/
mv /home/user/Downloads/grav-admin-v1.6.28.zip .
unzip grav-admin-v1.6.28.zip 
rm grav-admin-v1.6.28.zip 
mv grav-admin/* .
mv grav-admin/.* .
rmdir grav-admin/
chown -R www-data: *
chown -R www-data: .*

# Install php modules dependancies
apt install php-mbstring php-curl php-dom php-gd php-xml php-zip
# Enable apache mod rewrite
a2enmod rewrite
# Add "AllowOverride All" to apache's virtualhost configuration
nano /etc/apache2/sites-available/000-default.conf

So it looks like this : image

# Restart apache service
service apache2 restart

Thanks for your help !

tigerblue77 avatar Nov 24 '20 18:11 tigerblue77

@tigerblue77 I moved it to here in order to improve the docs.

mahagr avatar Nov 24 '20 18:11 mahagr

@tigerblue77 I moved it to here in order to improve the docs.

Thanks for your consideration

tigerblue77 avatar Nov 24 '20 19:11 tigerblue77