<p>The 503 error on the home page usually indicates that Craft can't connect to the database. That's to be expected when performing a fresh installation.</p>

<p>The internal server error could be a typo or other misconfiguration in the <code>/web/.htaccess</code> file. You can troubleshoot this by renaming the <code>.htaccess</code> file so Apache doesn't use it, then in <code>/config/general.php</code> set</p>

<pre><code>'omitScriptNameInUrls' =&gt; false,
</code></pre>

<p><code>index.php?p=admin</code> should work then and you can sort out the <code>.htaccess</code> url rewrites later.</p>

CC BY-SA 4.0
2018-06-29T16:37:19.017Z
I can't thank you enough for this! It's been driving me crazy and this did work :)
ViciousKitten
CC BY-SA 4.0
2018-06-29T16:22:12.160Z
2018-07-01T00:44:23.443Z
2018-07-01T00:44:23.443Z
Sam Hernandez
<p>In my case the <code>/web/.htaccess</code> file was missing a </p>

<pre><code>RewriteBase /
</code></pre>

<p>after the <code>RewriteEngine On</code> statement. I had this issue only on one specific web server of a customer, so that's something you might try when the answer of Sam is temporary solving your issue.</p>

CC BY-SA 4.0
2022-08-02T18:17:32.253Z
This did it for me. Took me a lot of Googling to find your answer. Thank you so much!
mike_freegan
CC BY-SA 4.0
2019-07-31T21:27:21.277Z
2019-07-31T21:27:21.277Z
Manuel
<p>For the last 3 days i've been trying to install Craft CMS 3 on my server.</p>

<p>I'm using 1&amp;1 internet, have FTP uploaded all the files, changed the permissions for the folders and files to the right level and made sure everything is pointing in the right place.</p>

<p>It's worth noting i've installed Craft CMS 2 on this exact server for years with no issues at all. I also successfully installed Craft CMS 3 locally with no issues.</p>

<p>Going to mydomainname.com shows a craft error page with</p>

<pre><code>HTTP 503 – Service Unavailable - craft\web\ServiceUnavailableHttpException

throw new ServiceUnavailableHttpException();
</code></pre>

<p><a href="https://i.sstatic.net/rVNyN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rVNyN.png" alt="enter image description here"></a></p>

<p>Going to /admin/install or index.php?p=admin doesn't work it just gives me an Apache Error screen with 500 Internal Server Error.</p>

<p><a href="https://i.sstatic.net/cMq82.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cMq82.png" alt="enter image description here"></a></p>

<p>I've also tried using ssh and attempted to install composer but have been unsuccessful at that as my server doesn't seem to want to allow me to.</p>

<p>I need to get a website live asap and don't really know what I can do next! I'm not hugely experienced with servers etc. </p>

<p>Any advice much appreciated.</p>

CC BY-SA 4.0
2018-06-26T14:51:48.767Z
Are you sure the database settings are correct in .env? If they are wrong I think you will get the 503 error.
Andrew
CC BY-SA 4.0
2018-06-26T16:33:52.787Z
@Andrew thanks for your response. The .env db settings are correct as far as i can tell. But also on the Craft CMS 3 install page It says to set up the db, then setup the web server and then run the setup wizard. You then get the chance to add your db details once in the wizard (https://docs.craftcms.com/v3/installation.html#step-4-create-a-database)
ViciousKitten
<craft3><server>
Craft 3: 500 Internal Server Error when trying to install on server
# Craft 3: 500 Internal Server Error when trying to install on server

(Asked by: username_0 on 2018-06-26)

For the last 3 days i've been trying to install Craft CMS 3 on my server.
I'm using 1&1 internet, have FTP uploaded all the files, changed the permissions for the folders and files to the right level and made sure everything is pointing in the right place.
It's worth noting i've installed Craft CMS 2 on this exact server for years with no issues at all. I also successfully installed Craft CMS 3 locally with no issues.
Going to mydomainname.com shows a craft error page with
HTTP 503 – Service Unavailable - craft\web\ServiceUnavailableHttpException

throw new ServiceUnavailableHttpException();


Going to /admin/install or index.php?p=admin doesn't work it just gives me an Apache Error screen with 500 Internal Server Error.

I've also tried using ssh and attempted to install composer but have been unsuccessful at that as my server doesn't seem to want to allow me to.
I need to get a website live asap and don't really know what I can do next! I'm not hugely experienced with servers etc. 
Any advice much appreciated.

**Tags:** craft3, server

> **Comments:**
> **username_1**: Are you sure the database settings are correct in .env? If they are wrong I think you will get the 503 error.  
> **username_0**: @username_1 thanks for your response. The .env db settings are correct as far as i can tell. But also on the Craft CMS 3 install page It says to set up the db, then setup the web server and then run the setup wizard. You then get the chance to add your db details once in the wizard (https://docs.craftcms.com/v3/installation.html#step-4-create-a-database)  

---

## 2 answers

### Answer by username_2 on 2018-06-29. Score: 5 | Accepted answer

The 503 error on the home page usually indicates that Craft can't connect to the database. That's to be expected when performing a fresh installation.
The internal server error could be a typo or other misconfiguration in the /web/.htaccess file. You can troubleshoot this by renaming the .htaccess file so Apache doesn't use it, then in /config/general.php set
'omitScriptNameInUrls' => false,

index.php?p=admin should work then and you can sort out the .htaccess url rewrites later.

> **Comments:**
> **username_0**: I can't thank you enough for this! It's been driving me crazy and this did work :)  

---

### Answer by username_3 on 2019-07-31. Score: 2

In my case the /web/.htaccess file was missing a 
RewriteBase /

after the RewriteEngine On statement. I had this issue only on one specific web server of a customer, so that's something you might try when the answer of Sam is temporary solving your issue.

> **Comments:**
> **username_4**: This did it for me. Took me a lot of Googling to find your answer. Thank you so much!  

---

