Directus: Issue with LAMP installation

Created on 23 Oct 2019  路  4Comments  路  Source: directus/directus

I'm having an issue similar to the one metioned in #2286. I'm using a LAMP VM from AWS lightsail. Mod_rewrite and AllowOverride are both enabled, I've set the document root to be directus/public, but when I navigate to /admin the login screen appears but it errors out with an 500 error with SSO endpoint. I know there has to be something I'm missing here, but I'm not sure. Any help would be appreciated. Thanks

Most helpful comment

Ok! Figured it out! So with AWS LightSail's LAMP stack, they have 'bitnami' as both the owner and group for the permissions as default. I had to recursively change the group to 'daemon'

sudo chown -R bitnami:daemon /opt/bitnami/apache2/htdocs
sudo chmod -R g+w /opt/bitnami/apache2/htdocs

Thanks for the help!

All 4 comments

Also here is what I currently have for my configuration

```

DocumentRoot "/opt/bitnami/apache2/htdocs/directus/public"

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

Require all granted

# Error Documents
ErrorDocument 503 /503.html

# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"

Can you confirm you have all the required php extension installed and that Directus has the right permissions to write files?

Yes, doing php -m shows the following:

bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mongodb
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

I believe all the required modules are present, although I've seen a few conflicting sources so I'm not entirely sure what all should be included.

As far as Directus having the permissions, do you mean having www-data as the owner for the root directory? If so that is also good to go.

Ok! Figured it out! So with AWS LightSail's LAMP stack, they have 'bitnami' as both the owner and group for the permissions as default. I had to recursively change the group to 'daemon'

sudo chown -R bitnami:daemon /opt/bitnami/apache2/htdocs
sudo chmod -R g+w /opt/bitnami/apache2/htdocs

Thanks for the help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dimitrov-adrian picture dimitrov-adrian  路  3Comments

lluishi93 picture lluishi93  路  3Comments

tmikaeld picture tmikaeld  路  5Comments

andriusign picture andriusign  路  3Comments

benhaynes picture benhaynes  路  4Comments