Answers.Body: <p>On the public_html/index.php file, try replacing </p>
  
  <pre><code>define('CRAFT_BASE_PATH', dirname(__DIR__));
  </code></pre>
  
  <p>with</p>
  
  <pre><code>define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));
  </code></pre>
  
  <p>The structure of my folders is as follow:</p>
  
  <p>/home/username/<br>
    - public_html, or just html / this is where the content of your web folder goes  <br>
    - config<br>
    - modules<br>
    - storage<br>
    - templates<br>
    - vendor<br>
    - (and then the composer/env files)<br></p>
  
  <p>Then on the index.php file (which can be found under /home/username/public_html/index.php),you'd replace:</p>
  
  <pre><code> define('CRAFT_BASE_PATH', dirname(__DIR__));
  </code></pre>
  
  <p>with</p>
  
  <pre><code> define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/'));
  </code></pre>
  
  <p>If you only have access to the public_html folder or would like to install craft3 on a subfolder this is how you can structure it:</p>
  
  <p>on your public_html (/home/username/public_html),
  create a craft subfolder((/home/username/public_html/craft)), then send your craft3 web folder into the public_html. It should look like this:</p>
  
  <p>/home/username/public_html/<br>
                 -index.php<br>
                 -web.config<br>
                 -.htaccess<br>
                 /craft/<br></p>
  
  <p>In your index.php file, replace</p>
  
  <pre><code>define('CRAFT_BASE_PATH', dirname(__DIR__));
  </code></pre>
  
  <p>with</p>
  
  <pre><code> define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));
  </code></pre>
  
  <p>Hope this helps.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-12T18:58:23.967Z
Answers.Text: I'm going to assume you meant the /home/username/public_html/craft/web/index.php file since that's the only one with this line. I changed it to define('CRAFT_BASE_PATH', ('/home/username/public_html/craft')); , then reset my apache server and nothing's changed.
Answers.UserDisplayName: Chloe LaPointe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-13T22:42:59.467Z
Answers.Text: I updated my answer
Answers.UserDisplayName: Richard Songo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-15T01:00:37.373Z
Answers.Text: I saw. Unfortunately I think the issue is more related to what PHP extensions are available for easyapache4 and PHP7. I can't account for about 1/2 of them, but since my directory is set up the way you described, and I've got everything else set up right, I'm not really left with much of a choice but to believe that's the case. As I said in a comment thread on my OP, I'm going to try running an install on Arcustech and see if I can't recreate this issue.
Answers.UserDisplayName: Chloe LaPointe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-17T05:10:48.567Z
Answers.Text: Can you check the logs under storage/logs/web.log to get the real reason why you're getting that error message.
Answers.UserDisplayName: Richard Songo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-03T09:41:18.417Z
Answers.Text: If you are using easyapache/CPanel then the wbe root folder needs to be chmod 0750 and chown: user:nobody
Answers.UserDisplayName: joomkit
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-12T05:32:51.003Z
Answers.LastActivityDate: 2018-04-13T22:46:25.837Z
Answers.LastEditDate: 2018-04-13T22:46:25.837Z
Answers.UserDisplayName: Richard Songo
Body: <p>I've been Googling around all day looking for answers to this, but I'm actually stuck.</p>
  
  <p>Ok, so basically I installed Craft 3 via Composer into a subdomain on my development server (apache). Everything ran successfully, there are no error logs, and the database has been populated with all of the tables. The problem is that if I go to <code>http://craft.domain.com/index.php?p=admin</code> (or <code>/index/admin</code> or <code>/admin</code> or <code>/</code>) all I get is a <em>500 Internal server error</em>, and not one with the fancy craft background either. It does say <code>email webmaster@craft.domain.com...</code> on the error screen so I know SOMETHING's clicking, but I can't work my way around this.</p>
  
  <p>I tried installing Craft once before manually by extracting the zip, uploading all the files, and then changing the <code>.env</code> file, and I got a similar result. I still wasn't able to access the admin OR the install page, and that's why I ended up trying it all through Composer instead.</p>
  
  <p>Running the latest version of Apache, PHP 7, MYSQL with InnoDB; I run a ton of wordpress and laravel sites on this server without issue so I'm not clear on what makes Craft so different. I have WHM and shell access. Open to all suggestions.</p>
  
  <p>Directory structure looks like this: </p>
  
  <pre><code>/home/username/public_html/craft (this is also the subdomain path)
    - config
    - modules
    - storage
    - templates
    - vendor
    - web
    - (and then the composer/env files)
  </code></pre>
  
  <p>Directory permissions are 775, the rest of the files are default Craft 3 installation. I've also made sure my PHP 7 memory limit is at 128MB (it was set to 32MB for some reason).
  Thank you for any advice in advance! </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-13T21:19:54.053Z
Comments.Text: After some more research I think the issue is not to do with my folder structure (I tested this on a fresh installation, no subdomain), and more to do with what PHP extensions are in my build of Apache. There are several extensions I don't have the ability to install with easyApache4, so I might be out of luck with installing craft on this server. I'm going to try a simple VPS from Arcustech and see if that makes a difference.
Comments.UserDisplayName: Chloe LaPointe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-09T23:52:49.347Z
Comments.Text: I'm assuming your web server points to `/home/username/public_html/craft/web` ?
Comments.UserDisplayName: Jalen Davenport
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T01:09:38.117Z
Comments.Text: No just /home/username/public_html/craft. Does it need to point to web?
Comments.UserDisplayName: Chloe LaPointe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T01:10:39.540Z
Comments.Text: Yes, I'm pretty sure it does. Try it out and let me know how it goes... If it turns out to be the solution let me know so I can add it as an answer below.
Comments.UserDisplayName: Jalen Davenport
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T01:14:16.663Z
Comments.Text: No good. I'm still getting the same 500 error. I restarted my DNS server in WHM just in case but no luck.
Comments.UserDisplayName: Chloe LaPointe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T05:13:12.543Z
Comments.Text: I had something similar, and I started putting debug points ( echo "got here";exit; ) into index.php and the files it called. It seemed to fail at invoking the main instance of Craft. I haven't resolved that. So I don't know if this helps.
Comments.UserDisplayName: kr37
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T08:11:03.243Z
Comments.Text: Did craft issue a security key when it installed? Assuming you performed the setup via ssh, can you check your .env file to make sure all your settings are correct? Also do you have access to your  web directory via your provider's control panel? Make sure you point to yoursubdomain /web.
Comments.UserDisplayName: Nutmeg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T16:51:12.333Z
Comments.Text: @nutmeg Yes, all the settings are correct. The shell setup auto-generated a security key so that's in there properly as well. The subdomain is pointed to the /web directory as well. No dice, I'm still getting 500 errors.
Comments.UserDisplayName: Chloe LaPointe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T20:43:06.963Z
Comments.Text: Did you perform a "Composer update", if that returns "nothing to update" you will need to query your server. I assume you checked the server's config (e.g. php -v) etc.  Another, more cumbersome, action is to try to replicate the issue by reinstalling on a new subdomain. BTW: are you on a shared environment (VPS)?
Comments.UserDisplayName: Nutmeg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-10T22:53:54.303Z
Comments.Text: I am on a VPS yes. I just ran composer update in public_html/craft and it did the whole "loading composer repositories..."etc. It looks like it completed just fine. Checked server's config and it's definitely PHP 7.0.29, and Zend OPCache. Nothing seems out of place and I'm still getting 500 errors. I'm going to try this whole process again on a non-subdomain and separate cpanel and see what happens.
Comments.UserDisplayName: Chloe LaPointe
Tags: <craft3><installation><composer>
Title: Successfully installed Craft 3 via Composer but can't access site or admin
ThreadText: # Successfully installed Craft 3 via Composer but can't access site or admin
  
  (Asked by: username_0 on 2018-04-09)
  
  I've been Googling around all day looking for answers to this, but I'm actually stuck.
  
  Ok, so basically I installed Craft 3 via Composer into a subdomain on my development server (apache). Everything ran successfully, there are no error logs, and the database has been populated with all of the tables. The problem is that if I go to `http://craft.domain.com/index.php?p=admin` (or `/index/admin` or `/admin` or `/`) all I get is a *500 Internal server error*, and not one with the fancy craft background either. It does say `email webmaster@craft.domain.com...` on the error screen so I know SOMETHING's clicking, but I can't work my way around this.
  
  I tried installing Craft once before manually by extracting the zip, uploading all the files, and then changing the `.env` file, and I got a similar result. I still wasn't able to access the admin OR the install page, and that's why I ended up trying it all through Composer instead.
  
  Running the latest version of Apache, PHP 7, MYSQL with InnoDB; I run a ton of wordpress and laravel sites on this server without issue so I'm not clear on what makes Craft so different. I have WHM and shell access. Open to all suggestions.
  
  Directory structure looks like this:
  
  ```
  /home/username/public_html/craft (this is also the subdomain path)
    - config
    - modules
    - storage
    - templates
    - vendor
    - web
    - (and then the composer/env files)
  
  ```
  
  Directory permissions are 775, the rest of the files are default Craft 3 installation. I've also made sure my PHP 7 memory limit is at 128MB (it was set to 32MB for some reason).
  Thank you for any advice in advance!
  
  **Tags:** craft3, installation, composer
  
  > **Comments:**
  > **username_1**: I'm assuming your web server points to `/home/username/public_html/craft/web` ?  
  > **username_0**: No just /home/username/public_html/craft. Does it need to point to web?  
  > **username_1**: Yes, I'm pretty sure it does. Try it out and let me know how it goes... If it turns out to be the solution let me know so I can add it as an answer below.  
  > **username_0**: No good. I'm still getting the same 500 error. I restarted my DNS server in WHM just in case but no luck.  
  > **username_2**: I had something similar, and I started putting debug points ( echo "got here";exit; ) into index.php and the files it called. It seemed to fail at invoking the main instance of Craft. I haven't resolved that. So I don't know if this helps.  
  > **username_3**: Did craft issue a security key when it installed? Assuming you performed the setup via ssh, can you check your .env file to make sure all your settings are correct? Also do you have access to your  web directory via your provider's control panel? Make sure you point to yoursubdomain /web.  
  > **username_0**: @username_3 Yes, all the settings are correct. The shell setup auto-generated a security key so that's in there properly as well. The subdomain is pointed to the /web directory as well. No dice, I'm still getting 500 errors.  
  > **username_3**: Did you perform a "Composer update", if that returns "nothing to update" you will need to query your server. I assume you checked the server's config (e.g. php -v) etc.  Another, more cumbersome, action is to try to replicate the issue by reinstalling on a new subdomain. BTW: are you on a shared environment (VPS)?  
  > **username_0**: I am on a VPS yes. I just ran composer update in public_html/craft and it did the whole "loading composer repositories..."etc. It looks like it completed just fine. Checked server's config and it's definitely PHP 7.0.29, and Zend OPCache. Nothing seems out of place and I'm still getting 500 errors. I'm going to try this whole process again on a non-subdomain and separate cpanel and see what happens.  
  > **username_0**: After some more research I think the issue is not to do with my folder structure (I tested this on a fresh installation, no subdomain), and more to do with what PHP extensions are in my build of Apache. There are several extensions I don't have the ability to install with easyApache4, so I might be out of luck with installing craft on this server. I'm going to try a simple VPS from Arcustech and see if that makes a difference.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2018-04-12. Score: 1
  
  On the public\_html/index.php file, try replacing
  
  ```
  define('CRAFT_BASE_PATH', dirname(__DIR__));
  
  ```
  
  with
  
  ```
  define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));
  
  ```
  
  The structure of my folders is as follow:
  
  /home/username/  
  - public\_html, or just html / this is where the content of your web folder goes   
  - config  
  - modules  
  - storage  
  - templates  
  - vendor  
  - (and then the composer/env files)
  
  Then on the index.php file (which can be found under /home/username/public\_html/index.php),you'd replace:
  
  ```
   define('CRAFT_BASE_PATH', dirname(__DIR__));
  
  ```
  
  with
  
  ```
   define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/'));
  
  ```
  
  If you only have access to the public\_html folder or would like to install craft3 on a subfolder this is how you can structure it:
  
  on your public\_html (/home/username/public\_html),
  create a craft subfolder((/home/username/public\_html/craft)), then send your craft3 web folder into the public\_html. It should look like this:
  
  /home/username/public\_html/  
  -index.php  
  -web.config  
  -.htaccess  
  /craft/
  
  In your index.php file, replace
  
  ```
  define('CRAFT_BASE_PATH', dirname(__DIR__));
  
  ```
  
  with
  
  ```
   define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));
  
  ```
  
  Hope this helps.
  
  > **Comments:**
  > **username_0**: I'm going to assume you meant the /home/username/public_html/craft/web/index.php file since that's the only one with this line. I changed it to define('CRAFT_BASE_PATH', ('/home/username/public_html/craft')); , then reset my apache server and nothing's changed.  
  > **username_4**: I updated my answer  
  > **username_0**: I saw. Unfortunately I think the issue is more related to what PHP extensions are available for easyapache4 and PHP7. I can't account for about 1/2 of them, but since my directory is set up the way you described, and I've got everything else set up right, I'm not really left with much of a choice but to believe that's the case. As I said in a comment thread on my OP, I'm going to try running an install on Arcustech and see if I can't recreate this issue.  
  > **username_4**: Can you check the logs under storage/logs/web.log to get the real reason why you're getting that error message.  
  > **username_5**: If you are using easyapache/CPanel then the wbe root folder needs to be chmod 0750 and chown: user:nobody  
  
  ---
  
  