Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Our client wants 2 subdomains creating:

mobile.website.co.uk

5thbirthday.website.co.uk

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
add comment

1 Answer 1

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.com = domain

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

user@domain.com

instead of ssh domain.com 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 mobile.website.com 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
add comment

Your Answer

 
discard

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.