| Knowledgebase Home | Glossary | Favorites |
| SSH Container Navigation | ||||||||||
Table of Contents
Listing Files and DirectoriesWhen using SSH to access a container a user will be placed into their home directory. By default, a sites/ directory, which all sites live under, will be in the home directory. To verify this use the ls command while in a home directory:[demo@c-web1 ~]$ ls sitesTo get a more detailed list use the ls -la command: [demo@c-web1 ~]$ ls -la total 24 drwxr-x--x 3 demo admin 4096 Feb 22 22:30 . drwxr-xr-x 3 root root 4096 Feb 17 17:45 .. -rw------- 1 demo admin 1816 Apr 12 21:05 .bash_history -rw-r--r-- 1 demo admin 24 Feb 17 17:45 .bash_logout -rw-r--r-- 1 demo admin 176 Feb 17 17:45 .bash_profile -rw-r--r-- 1 demo admin 124 Feb 17 17:45 .bashrc drwxr-x--x 3 demo apache 4096 Mar 25 19:25 sitesThis command shows all of the hidden folders and files as well as the ownership and permission of all folders and files. Changing DirectoriesTo change directories use the cd command. This can be done in relationship to the current directory:[demo@c-web1 ~]$ cd sites/or with full paths: [demo@c-web1 sites]$ cd /home/demo/sites/ Showing Current DirectoryIt can often be helpful to know which directory you are currently in. To do this use the pwd command:[demo@c-web1 sites]$ pwd /home/demo/sites Navigating Sites and EnvironmentsOn a container each site environment gets its own document root. To get there, first change to the sites/ folder:[demo@c-web1 sites]$ cd /home/demo/sites/Now list the directories in that folder: [demo@c-web1 sites]$ ls mystackable.com_env1 yourstackable.com_Version_1 mystackable.com_Version_2 yourstackable.com_Version_2Each folder represents a site environment. For example, if we want to change the files in mystackable.com_evn1 we will need to change to that directory: [demo@c-web1 sites]$ cd mystackable.com_env1/ [demo@c-web1 mystackable.com_env1]$ ls doc_rootWe can see that there is a doc_root/ folder there. This is where the site files for that environment will live: [demo@c-web1 mystackable.com_env1]$ cd doc_root/We are now in the root for the environment. All of the files in this folder will be accessible by the environment. |
| Visitor Comments |
|
| Related Articles |
| No related articles were found. |
| Attachments |
| No attachments were found. |