Answers.Body: <p>Ok I actually managed to fix this. I moved the index.php file from the cms/public subfolder to public_html and it worked a treat. I had to change the following code:</p>
  
  <pre><code>// Path to your craft/ folder
  $craftPath = '../craft';
  </code></pre>
  
  <p>to </p>
  
  <pre><code>// Path to your craft/ folder
  $craftPath = 'cms/craft';
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-04T10:37:22.960Z
Answers.LastActivityDate: 2017-12-04T10:37:22.960Z
Answers.UserDisplayName: Matt
Body: <p>I have created a Craft CMS site on a VPS Server running CentOS 7. I have a file setup on the public_html like this: -</p>
  
  <ul>
  <li>cms
  
  <ul>
  <li>craft</li>
  <li>public</li>
  </ul></li>
  <li>app (this is running a Symfony Framework Web App and runs from app.example.com perfectly)</li>
  </ul>
  
  <p>Now I have the site working from www.example.com but when I login to the back office all of the links say... <a href="https://www.example.com/cms/public/admin/dashboard" rel="nofollow noreferrer">https://www.example.com/cms/public/admin/dashboard</a>. I want to remove cms/public from the URL links in the back office.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-04T15:15:52.243Z
Comments.Text: It sounds like you might need to do some URL rewriting with an .htaccess file or similar depending on your setup. Looks like this question might already have an [answer over here](https://craftcms.stackexchange.com/questions/13717/remove-subdirectories-from-admin-url-with-htaccess).
Comments.UserDisplayName: Cavell Blood
Tags: <url><redirect><install><htaccess><apache>
Title: Installing Craft in a Sub Folder
ThreadText: # Installing Craft in a Sub Folder
  
  (Asked by: username_0 on 2017-12-04)
  
  I have created a Craft CMS site on a VPS Server running CentOS 7. I have a file setup on the public\_html like this: -
  
  * cms
    + craft
    + public
  * app (this is running a Symfony Framework Web App and runs from app.example.com perfectly)
  
  Now I have the site working from www.example.com but when I login to the back office all of the links say... <https://www.example.com/cms/public/admin/dashboard>. I want to remove cms/public from the URL links in the back office.
  
  **Tags:** url, redirect, install, htaccess, apache
  
  > **Comments:**
  > **username_1**: It sounds like you might need to do some URL rewriting with an .htaccess file or similar depending on your setup. Looks like this question might already have an [answer over here](https://craftcms.stackexchange.com/questions/13717/remove-subdirectories-from-admin-url-with-htaccess).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-12-04. Score: 1 | Accepted answer
  
  Ok I actually managed to fix this. I moved the index.php file from the cms/public subfolder to public\_html and it worked a treat. I had to change the following code:
  
  ```
  // Path to your craft/ folder
  $craftPath = '../craft';
  
  ```
  
  to
  
  ```
  // Path to your craft/ folder
  $craftPath = 'cms/craft';
  
  ```
  
  
  ---
  
  