Silverstripe install question - 2x websites

Silverstripe Version:

5.3.0

Question:
Since I’m a complete novice on Linux (I come from a very deep Windows background), I tried to install Silverstripe on Windows but ran into errors / issues, so was advised to use Linux (which does make sense).

My server has the following installed and confirmed as working:
Ubuntu 24.04 LTS - All current updates applied
MySQL - 8.0.40
PHP 8.4.2
Apache 2.4.62
phpMyAdmin 5.2.1

Details of your query go here
When I used Composer to install 2x Silverstripe instances (site1 and site2), it installed these into my “home” directory (ie: /home/user/site1 and /home/user/site2).

I’m planning on having 2x Silverstripe based websites on the server.

The websites are currently hosted elsewhere on Wordpress instances - with each having a domain name pointed at them. I know that I’m going to need to re-develop the websites which is fine as I’m not in a rush.

How do I move these to /var/www/html or link to the folders where they are in the “home” directory?

I assume this is a duplicate of Silverstripe Install Issues?

Nope, not a duplicate.

Since I dumped my Win2K16 install and went Ubuntu, I ran into another issue, so logged a different help request for it.

I have worked out how to move the “sites” created by composer in my “Home” directory to /var/www/html/site1 and /var/www/html/site2.

For Site1, I have tried starting the install / setup process, had an issue getting my .env file correct but worked past that to run into the next issue which is below. I haven’t done anything with Site2 yet as I’m working out the issues with Site1 first.

The error I’m now stuck on is:

404 Not Found

Not Found

The requested URL was not found on this server.


Apache/2.4.58 (Ubuntu) Server at IPADDRESS Port 80

I have tried doing a Flush as well as rebooting the server, but haven’t managed to clear or work around the issue.

NOTE: IPADDRESS being an internal IP address on my network as the server is very much a dev/test machine while I would out any issues and build both sites.

It sounds like this is more of a question on configuring Apache than a Silverstripe one.

Apache needs to know where the files (documentroot) for the site live, so it can serve them up when it needs to. They can exist anywhere on your filesystem, so if it’s just a dev machine, there’s no real harm in serving them from the home directory. It may be worth reading through something like this article: How To Install Linux, Apache, MySQL, PHP (LAMP) Stack on Ubuntu | DigitalOcean - that talks about virtual hosts, etc.

If you’ve already done a load of configuration, it might be worth sharing a bit more of what you have already in place.

As an alternative, you could also look at ddev… it’s a good way to get development environments up and running, and works well with Silverstripe: https://www.youtube.com/watch?v=O0mHczO95aM&t=6s