Support the ongoing development of Laravel.io →
Installation Configuration Architecture
Last updated 1 year ago.
0

So, here's what I did.

First, I created a subdomain via the Plesk control panel. In this example, I created the subdomain "sub" in the domain "domain.com". I set the web root for "sub" to be in the same hierarchy as "httpdocs", so by default, if I put an "index.php" file in the "sub" directory, it would get served as the index for the web root of http://sub.domain.com.

Next, I ran the Laravel install with Composer:

composer create-project laravel/laravel /var/www/vhosts/domain.com/sub/ --prefer-dist

[InvalidArgumentException] Project directory /var/www/vhosts/domain.com/sub/ is not empty.

After emptying the tools directory, the install worked, but I don't think it was installed the way that I planned.

Now, I have this directory structure:

/var/www/vhosts/domain.com/sub/app /var/www/vhosts/domain.com/sub/bootstrap /var/www/vhosts/domain.com/sub/public /var/www/vhosts/domain.com/sub/vendor

When I go to http://sub.domain.com, I just see the default CentOS page.

When I go to http://sub.domain.com/public/, I though I would see the "Hello world!" output, but I got this error "Error in exception handler."

I am still confused. How should I have done this? Am I doing something incorrectly?

Last updated 1 year ago.
0

I understand now. I believe I need to alter my game plan.

Here's the story, and an important follow-up question at the end.

Again, I get an error:

[InvalidArgumentException] Project directory /var/www/vhosts/domain.com/ is not empty.

The directory domain.com cannot be emptied in this particular case, since it contains the actual httpdocs directory for the domain, accessible from the internet via http://www.domain.com. There is already another actual website in the httpdocs directory.

If the directory must be empty for Composer to install Laravel, then I'm guessing when I create the subdomain, I have to create to point at a subdirectory off of the one I want?

I suppose I should ask this question instead:

When I'm creating the subdomain where I want Laravel to run, I have just two fields to fill out (question at the bottom):

The subdomain name, which will be the xxx.domain.com, in this case: sub The document root, which I was putting in "sub", making the root /var/www/vhosts/domain.com/sub/, which is currently a problem.

What does the document root need to be with the intention that I want access my Laravel app from http://sub.domain.com?

Last updated 1 year ago.
0

I don't pretend to have extensive knowledge of web server administration, but I have been managing 2 servers for the past 3 or so years.

The only support I have is reaching out through communities like this one.

At any rate, thanks for your help.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rickjedi rickjedi Joined 20 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.