Answers.Body: <p>About the 1st issue.
  This is a server misconfiguration issue. You must configure your nginx/apache/another server to point the domain to the /web directory
  Here is an base example for nginx</p>
  <pre><code>server {
      listen      8080 default_server;
      listen      [::]:8080 default_server;
      server_name _;
      root        /www/mysite.be/web;
  ....
  }
  </code></pre>
  <p><a href="https://craftcms.stackexchange.com/questions/33612/how-do-i-change-the-web-directory">A similar question has already been asked</a> and  <a href="https://craftcms.stackexchange.com/questions/39623/website-transfer-places-web-in-all-urls-cs-and-js-not-loaded-when-moved-up-dir">another one</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-08T14:17:38.327Z
Answers.Text: You need to point the hosting server to the public directory. On the settings page of the hoster, the domains root directory must be set to "sitename.be/web/" instead of "sitename".be".
Answers.UserDisplayName: MisterMike
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-09T11:36:51.900Z
Answers.LastActivityDate: 2022-07-09T11:58:54.577Z
Answers.LastEditDate: 2022-07-09T11:58:54.577Z
Answers.UserDisplayName: RomanAvr
Body: <p>It's my first time deploying CraftCMS and I ran into some issues which I don't seem to fix. I'm using Combell to host my website.</p>
  <ol>
  <li><p>I can only access my site when I go to &quot;sitename&quot;.be/web/ . The CSS is loading correctly but the images won't show up, I also would like to be &quot;sitename&quot;.be/ to be the main path instead of the /web folder.</p>
  </li>
  <li><p>Suddenly the admin page it's css stopped working and I got around 50 cpresources 403 errors even though I did give the folder the right permissions.</p>
  </li>
  </ol>
  <p>Thank you in advance!</p>
  <p><strong>fix Problem two:</strong>
  I managed to fix the second problem, when i set the file permissions it didn't apply to the subdirectories and their contents. So I had to change them one by one.</p>
  
Tags: <assets><url><config><projectconfig><configuration>
Title: Hosting and permission problems
ThreadText: # Hosting and permission problems
  
  (Asked by: username_0 on 2022-07-09)
  
  It's my first time deploying CraftCMS and I ran into some issues which I don't seem to fix. I'm using Combell to host my website.
  
  1. I can only access my site when I go to "sitename".be/web/ . The CSS is loading correctly but the images won't show up, I also would like to be "sitename".be/ to be the main path instead of the /web folder.
  2. Suddenly the admin page it's css stopped working and I got around 50 cpresources 403 errors even though I did give the folder the right permissions.
  
  Thank you in advance!
  
  **fix Problem two:**
  I managed to fix the second problem, when i set the file permissions it didn't apply to the subdirectories and their contents. So I had to change them one by one.
  
  **Tags:** assets, url, config, projectconfig, configuration
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-07-09. Score: 1
  
  About the 1st issue.
  This is a server misconfiguration issue. You must configure your nginx/apache/another server to point the domain to the /web directory
  Here is an base example for nginx
  
  ```
  server {
      listen      8080 default_server;
      listen      [::]:8080 default_server;
      server_name _;
      root        /www/mysite.be/web;
  ....
  }
  
  ```
  
  [A similar question has already been asked](https://craftcms.stackexchange.com/questions/33612/how-do-i-change-the-web-directory) and [another one](https://craftcms.stackexchange.com/questions/39623/website-transfer-places-web-in-all-urls-cs-and-js-not-loaded-when-moved-up-dir).
  
  > **Comments:**
  > **username_2**: You need to point the hosting server to the public directory. On the settings page of the hoster, the domains root directory must be set to "sitename.be/web/" instead of "sitename".be".  
  
  ---
  
  