Answers.Body: <p>The problem turned out to be a missing vitally important step in the set-up of Apache.</p>
  
  <p>By default a fresh install of Ubuntu 18.04 has the following:</p>
  
  <pre><code>&lt;Directory /var/www&gt;
      AllowOveride None
  &lt;/Directory&gt;
  </code></pre>
  
  <p>And it needs to be AllowOverride All - or else your .htaccess files are not read. That was why I was getting 502 errors in the root url and 404 errors everywhere else.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-21T08:00:44.597Z
Answers.LastActivityDate: 2018-05-21T08:00:44.597Z
Answers.UserDisplayName: Matt Wilcox
Answers.Body: <p>When I had this problem previously, it was the permissions for the index.php that wasn't set to 644. </p>
  
  <p>Another issue I had once was my database password had some characters that wasn't accepted. Instead of getting errors, I just got a blank page saying Internal Server Error. Once I changed the password to omit weird characters, it worked perfectly. Wasted a ton of hours trying to figure that out.</p>
  
  <p>Good luck!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-15T13:04:42.313Z
Answers.LastActivityDate: 2018-05-15T13:04:42.313Z
Answers.UserDisplayName: EDub
Answers.Body: <p>When I had this problem previously, it was the permissions for the index.php that wasn't set to 644. Hope that works for you</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-14T18:45:48.770Z
Answers.LastActivityDate: 2018-05-14T18:45:48.770Z
Answers.UserDisplayName: EDub
Body: <p>I’ve set up a new Ubuntu 18.04 server, but can not get Craft 3 to run on it - despite it passing the <a href="https://github.com/craftcms/server-check" rel="nofollow noreferrer">Server test script</a> with flying colours.</p>
  
  <p>I know the server setup is OK as PHPmyAdmin is running on this server (though that has its own issues with PHP7.2, it does at least run).</p>
  
  <p>I don’t want to use Composer as it is not the right choice for our use case; so I’ve downloaded the zip and used that. It won’t install via the browser as whenever I go to /admin/install it claims a 404 error (going to index.php?p=admin redirects to /admin/install).</p>
  
  <p>If I go to the root of the site it claims an Internal Server Error. I can’t see any information in the /storage/logs files, nor in the /var/www/project/logs folder that Apache is configured to dump logs into when hitting the Internal Server Error. There are log entries - and I had issues with - permissions writing to files. Specifically to do with Yii2 file mutex and fopen.</p>
  
  <p>Anyone got any pointers?</p>
  
  <p>Apache is running as the default www-data user and group, the site files are owned by a user belonging to that group, and I’ve 774’d everything recursively.</p>
  
Tags: <craft3><installation>
Title: Craft 3 not running on Ubuntu 18.04
ThreadText: # Craft 3 not running on Ubuntu 18.04
  
  (Asked by: username_0 on 2018-05-02)
  
  I’ve set up a new Ubuntu 18.04 server, but can not get Craft 3 to run on it - despite it passing the [Server test script](https://github.com/craftcms/server-check) with flying colours.
  
  I know the server setup is OK as PHPmyAdmin is running on this server (though that has its own issues with PHP7.2, it does at least run).
  
  I don’t want to use Composer as it is not the right choice for our use case; so I’ve downloaded the zip and used that. It won’t install via the browser as whenever I go to /admin/install it claims a 404 error (going to index.php?p=admin redirects to /admin/install).
  
  If I go to the root of the site it claims an Internal Server Error. I can’t see any information in the /storage/logs files, nor in the /var/www/project/logs folder that Apache is configured to dump logs into when hitting the Internal Server Error. There are log entries - and I had issues with - permissions writing to files. Specifically to do with Yii2 file mutex and fopen.
  
  Anyone got any pointers?
  
  Apache is running as the default www-data user and group, the site files are owned by a user belonging to that group, and I’ve 774’d everything recursively.
  
  **Tags:** craft3, installation
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2018-05-21. Score: 0 | Accepted answer
  
  The problem turned out to be a missing vitally important step in the set-up of Apache.
  
  By default a fresh install of Ubuntu 18.04 has the following:
  
  ```
  <Directory /var/www>
      AllowOveride None
  </Directory>
  
  ```
  
  And it needs to be AllowOverride All - or else your .htaccess files are not read. That was why I was getting 502 errors in the root url and 404 errors everywhere else.
  
  
  ---
  
  ### Answer by username_1 on 2018-05-15. Score: 1
  
  When I had this problem previously, it was the permissions for the index.php that wasn't set to 644.
  
  Another issue I had once was my database password had some characters that wasn't accepted. Instead of getting errors, I just got a blank page saying Internal Server Error. Once I changed the password to omit weird characters, it worked perfectly. Wasted a ton of hours trying to figure that out.
  
  Good luck!
  
  
  ---
  
  ### Answer by username_1 on 2018-05-14. Score: 0
  
  When I had this problem previously, it was the permissions for the index.php that wasn't set to 644. Hope that works for you
  
  
  ---
  
  