Hello. It’s too difficult for me and I need help.
I recently created a website for a company. The company consists of four organizations. At first, there was no plan to divide the domains.
I thought of it as a submenu of the default address.
Again, the keys in that array have to be the domain names, not the folder name
And the domains all have to point to the same www folder. Please do it exactly like in the documentation.
Let’s say I create my multisite locally with MAMP Pro and I define two local domains (multisite.test and power.test) that point to the project root folder, in my case Users/me/public_html/multisite, my index.php would look like this:
Did I understand correctly? ‘index.php’ has been modified…!
In the folder used as a subdomain, there are ‘content’, ‘media’, ‘site’, and ‘assets’. (I got help from this article.)
I’ve read so many articles, and I’ve seen articles that modify ‘.htaccess’.
Is this necessary?
I’m so confused because it’s my first time. I’m sorry…
Actually for me it is unclear what you are trying to achieve. If you want to serve 4 independent Kirby websites, the basic approach would be to have 4 independent directories, with Kirby installations. The multisite approach simplifies this by moving the Kirby program folder one level higher and the modified index.php dispatch the requests to the subfolder which belongs to the requested domain name. So, I wouldn’t install one website into the main folder and 3 websites in subfolders within, but 4 subfolders - like it is shown in the cookbook recipe for 2 websites.
Your webserver configuration however points to the main folder for all 4 sites.
It doesn’t really matter if all four sites are in separate folders or if the main stuff is in the web root, the procedure is the same. Although it probably makes the structure cleaner.
At first, this site had no subdomain concept. So the website that connects to the main domain did not have a separate folder, and it was directly worked on /www.
The main domain is normally accessed.
Only one of the three subdomains is being tried, and there is an error.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at postmaster@power.dy.co.kr to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
If you restore your original setup (i.e. without the changes in index.php), do the subdomains work then? And show the same as the main domain? Once this works as expected, you can readd the changes in index.php
To check this error, it is imperative that the webserver logfile is inspected.
Do you have access to the logfiles? Do you have access to the webserver or virtual host configuration or do you have to live with a website which has to be placed into the www folder? So, what are your degrees of freedom here?