Silverstripe Version: 4.11.2
PHP Version: 8.0
Question: Hi. I’m getting to know Silverstripe and just want to host a SS site on Digital Ocean (LAMP installation). I was able to install it fine using composer (got no error after running the composer command to install) but when I go to my home page it just says 404 Not Found.
When I go to my home page, it redirects to myurl.com/dev/build. I’ve tried running composer locally and works fine.
I’ve checked my .env file and all the database credentials are correct.
Would appreciate any help ![:slight_smile: :slight_smile:](https://forum.silverstripe.org/images/emoji/twitter/slight_smile.png?v=10)
Thanks!
Does it redirect to /dev/build
or does it give you a 404 error? Those are two very different things.
If it’s redirecting to /dev/build
that would be because you haven’t run that manually, so there’s no database tables set up - so as a fallback it’s doing that for you.
Does the /dev/build
in the hosting run correctly? Do you have access to any error logs? Have you looked around for any articles specifically about hosting silverstripe on digital ocean?
I’ve been going to the url and it would redirect to /dev/build
. So yeah, I haven’t run that manually.
Still get the same 404 error when I try to run /dev/build
on the browser. Nothing in the logs.
But then I tried to run the dev build command in the terminal (vendor/bin/sake dev/build
in the root directory) and that worked. So the database tables are all set.
Now the default home page shows up fine but when I go to the About Us or Contact Us, I get the same 404 error (not the default silverstripe 404 page) And not sure if it make any difference, but this is a subdomain.
Ok, so I found out what the issue was - it was config file.
ServerName dev.myserver.com
DocumentRoot /var/www/dev.myserver.com/public
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
My DocumentRoot wasn’t the same as my Directory directive.
So I change it to <Directory /var/www/dev.myserver.com/public/> and it works fine now
And thanks for your suggestion about running /dev/build
manually, @GuySartorelli. That at least got it going!
1 Like