Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our client wants 2 subdomains creating:

I did this on the DNS server pointing them to the IP where the website was hosted.

I then SSH into the Linux Ubuntu 12.04 box and navigate using: cd /var/www/ and used sudo mkdir mobile and the same for 5thbirthday.

I need to create a binding in apache2 server but how can i do this?

In the GUI version of Linux I edited the 'sites enabled' file and added the physical location, default document and server IP. But how do i edit a file in SSH?

I tried the command (within the mobile folder to practice) touch test.txt and then edit test.txt I am able to edit the file but how do i save it?

I then need to give a user FTP access to the /var/www folder, currently they only have permissions to a random folder called, 'our-website' which contains nothing and is obviously redundant.

Hope you can help

share|improve this question

SSH access should give you remote access to a machine somewhere, which then allows you bash access. If you want to edit a "test" text file, try:

vim test.txt

i or insert

"foobar, or what you want here"

ctrl-c > shift > wq

that should work, let me know of the results. As for the FTP, you just include the user credentials in the login, as for SSH, like so:

user = user = domain

normally, to visit the site you would enter to visit it. However, to SSH properly you must include the user. This may be your problem. Try this:

instead of ssh and then logging in that way.

share|improve this answer
Thanks for the reply but my question was more how to create host headers in apache2. but if you could re-write your answer to include, 1) creating a folder (var\www\mobile) 2) creating a test htm file within that folder 3) creating the binding for for the folder then creating FTP access for the mobile folder with read write delete apend permissions i will award you with the bounty. – SOLDIER-OF-FORTUNE Jun 14 '12 at 8:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.