0

I’ve set up a new Ubuntu 18.04 server, but can not get Craft 3 to run on it - despite it passing the Server test script with flying colours.

I know the server setup is OK as PHPmyAdmin is running on this server (though that has its own issues with PHP7.2, it does at least run).

I don’t want to use Composer as it is not the right choice for our use case; so I’ve downloaded the zip and used that. It won’t install via the browser as whenever I go to /admin/install it claims a 404 error (going to index.php?p=admin redirects to /admin/install).

If I go to the root of the site it claims an Internal Server Error. I can’t see any information in the /storage/logs files, nor in the /var/www/project/logs folder that Apache is configured to dump logs into when hitting the Internal Server Error. There are log entries - and I had issues with - permissions writing to files. Specifically to do with Yii2 file mutex and fopen.

Anyone got any pointers?

Apache is running as the default www-data user and group, the site files are owned by a user belonging to that group, and I’ve 774’d everything recursively.

3 Answers 3

1

When I had this problem previously, it was the permissions for the index.php that wasn't set to 644.

Another issue I had once was my database password had some characters that wasn't accepted. Instead of getting errors, I just got a blank page saying Internal Server Error. Once I changed the password to omit weird characters, it worked perfectly. Wasted a ton of hours trying to figure that out.

Good luck!

0

When I had this problem previously, it was the permissions for the index.php that wasn't set to 644. Hope that works for you

0

The problem turned out to be a missing vitally important step in the set-up of Apache.

By default a fresh install of Ubuntu 18.04 has the following:

<Directory /var/www>
    AllowOveride None
</Directory>

And it needs to be AllowOverride All - or else your .htaccess files are not read. That was why I was getting 502 errors in the root url and 404 errors everywhere else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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