<p>This looks like a well visited question, its easy as something like this with apache2:</p>

<pre><code>&lt;VirtualHost *:80&gt;
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/web/

        &lt;Directory /var/www/html/web/&gt;
           Options FollowSymLinks
           AllowOverride None
           Require all granted
        &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</code></pre>

<p>This is just a sample vhost file, but the real important part here is that you have the <strong>web</strong> folder set as your document root. This of course wont help anyone not using apache.</p>

CC BY-SA 3.0
2018-03-21T08:06:37.170Z
2018-03-21T08:06:37.170Z
Dan Zuzevich
<p>This article might be useful to you; there is a section on how to deploy Craft CMS 3 as well:</p>

<p><a href="https://nystudio107.com/blog/setting-up-a-craft-cms-3-project" rel="nofollow noreferrer">Setting up a New Craft CMS 3 Project</a></p>

<p>We also recently did a podcast on <a href="https://devmode.fm/episodes/website-deployment-without-tears" rel="nofollow noreferrer">Website Deployment without Tears</a></p>

CC BY-SA 3.0
2018-01-07T00:20:35.383Z
2018-03-21T14:24:40.090Z
2018-03-21T14:24:40.090Z
andrew.welch
<p>I am quite new in Craft CMS 3. I have developed a new site and now I want to move it to the production server. I have just moved all the files by FTP, moved the database, changed .env variables. </p>

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

<p>But when I go to the URL I get a message: "Forbidden You don't have permission to access / on this server."</p>

<p>If I go to URL/web then I get the first page but without images. </p>

<p>URL/admin shows "Not Found The requested URL /admin was not found on this server."</p>

<p>How do I deploy the site? I cannot find a good article/help about deployment for Craft 3.</p>

CC BY-SA 3.0
2018-01-07T00:16:22.817Z
It's not about the deployment (moving/changing files) it's about the configuration of your server. Your root directory should be `path/to/craft/web` so you access `web/index.php` when you enter the normal url. Your url rewrite module should be on. You don't see any images because the file paths are messed up when you don't point to the web folder. You don't see the cp because you either entered the wrong url (`web/index.php?p=admin`) or your rewrite module is not on or you didn't move the htacces file. https://github.com/craftcms/docs/blob/master/en/installation.md#4-set-up-the-web-server
Robin Schambach
CC BY-SA 3.0
2018-01-07T21:30:47.987Z
Thanks Robin! I have .htacces in the /web/.htaccess folder, but I need another one in the root, right? Where can I find an example of root/.htaccess with redirection to /web? Maybe I need something more in this file? Why my craft 3 installation does not have it?
podeig
CC BY-SA 3.0
2018-01-08T04:35:00.617Z
There is no example or existing htacces because you don't need it. As I said your root folder for your vHost/your url should be the web folder. No one should ever have access to `/path/to/craft` only to `/path/to/craft/web`
Robin Schambach
CC BY-SA 4.0
2018-11-24T14:14:48.453Z
I´m in the same problem here, is there any guideline in the Craft docs to do this? I have to change the root directory on the host? I read that some folder need to be uno level up from the root for security reasons ( as craft 2 ), what folders, and how to configure the new path to them? This point it´s not clear for me.
Sebastián.
<craft3><deployment>
Deployment of Craft 3 site to the production server
# Deployment of Craft 3 site to the production server

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

I am quite new in Craft CMS 3. I have developed a new site and now I want to move it to the production server. I have just moved all the files by FTP, moved the database, changed .env variables.

[![enter image description here](https://i.sstatic.net/bRuE5.png)](https://i.sstatic.net/bRuE5.png)

But when I go to the URL I get a message: "Forbidden You don't have permission to access / on this server."

If I go to URL/web then I get the first page but without images.

URL/admin shows "Not Found The requested URL /admin was not found on this server."

How do I deploy the site? I cannot find a good article/help about deployment for Craft 3.

**Tags:** craft3, deployment
> **Comments:**
> **username_1**: It's not about the deployment (moving/changing files) it's about the configuration of your server. Your root directory should be `path/to/craft/web` so you access `web/index.php` when you enter the normal url. Your url rewrite module should be on. You don't see any images because the file paths are messed up when you don't point to the web folder. You don't see the cp because you either entered the wrong url (`web/index.php?p=admin`) or your rewrite module is not on or you didn't move the htacces file. https://github.com/craftcms/docs/blob/master/en/installation.md#4-set-up-the-web-server  
> **username_0**: Thanks Robin! I have .htacces in the /web/.htaccess folder, but I need another one in the root, right? Where can I find an example of root/.htaccess with redirection to /web? Maybe I need something more in this file? Why my craft 3 installation does not have it?  
> **username_1**: There is no example or existing htacces because you don't need it. As I said your root folder for your vHost/your url should be the web folder. No one should ever have access to `/path/to/craft` only to `/path/to/craft/web`  
> **username_2**: I´m in the same problem here, is there any guideline in the Craft docs to do this? I have to change the root directory on the host? I read that some folder need to be uno level up from the root for security reasons ( as craft 2 ), what folders, and how to configure the new path to them? This point it´s not clear for me.  

---

## 2 answers

### Answer by username_3 on 2018-03-21. Score: 3

This looks like a well visited question, its easy as something like this with apache2:

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/web/

        
           Options FollowSymLinks
           AllowOverride None
           Require all granted
        


This is just a sample vhost file, but the real important part here is that you have the web folder set as your document root. This of course wont help anyone not using apache.


---

### Answer by username_4 on 2018-01-07. Score: 1

This article might be useful to you; there is a section on how to deploy Craft CMS 3 as well:

[Setting up a New Craft CMS 3 Project](https://nystudio107.com/blog/setting-up-a-craft-cms-3-project)

We also recently did a podcast on [Website Deployment without Tears](https://devmode.fm/episodes/website-deployment-without-tears)


---

