ftping to test site on Linode

Hi guys

I'm testing uploading an index.php file to a test website I have set up in Linode.

First of all I tried uploading to the srv/www/mytestdomain.com/public_index when I was logged in as my Linode user, but I get an error 3 Permission Denied in WinSCP. I'm guessing that's telling me that I can't upload to that website, as I'm not the owner of the website?

My question is, how do I log into that website as the website owner (like I would on a typical shared hosting account)? I don't recall setting a username or pass for that domain when going through the 'Configuring Name-based Virtual Hosts' instructions - how is that done?

Thanks!

8 Replies

Hi Again,

if you have files that you want to upload to your website.

then do this.

1, you can use winscp,but you will only have access to the home folder of the account your logging in with..which is fine..

2, Once you copy the files from winscp to your server… log in useing ssh and you will then do this command .. sudo mv files to this location /srv/www/website.com/public

Thanks mate

I typed in:

sudo mv /home/myusername/index.php /srv/www/mytestdomain.com/public_html

and get the error:

mv: cannot stat `/home/myusername/index.php': No such file or directory

The file is definitely in the /home/myusername dir

On the same topic, how do you set up user account username and passwords for websites (so you can log into them via ftp) in the /srv/www dir? The guide didn't mention that part when configuring the files/dirs for websites.

have you installed mysql,php basic lampstack components

if not maybe you will need some additional training.. setting up a Linux lampstack

I hadn't rebooted after installing php. Did that, and now I can copy the file.

I'm set up LAMP now. Is there a topic in the guide that discusses allocating a username and pass to a website you've set up via Configuring Name-based Virtual Hosts?

you will need to configure mysql … create a database

what type of website are you creating cms?

drupal?

It's just a test page so I can get the hang of it. The test page is live on the net, which is good.

I don't understand how to connect to it via ftp like a normal webmaster would.

I set up a site via name based virtual host settings, and the site works because the real world can connect to it. Now say I set up a bunch of others, so I have 5 different websites, and they all belong to different people, so each needs their own username/pass (like on a shared host). Where do you set up the username and pass for each site when creating each named based virtual host? The guide mentions:

ServerAdmin webmaster@example.com

ServerName example.com

ServerAlias www.example.com

DocumentRoot /srv/www/example.com/public_html/

ErrorLog /srv/www/example.com/logs/error.log

CustomLog /srv/www/example.com/logs/access.log combined

So how does each webmaster connect to their site via ftp for example?

I would never connect to anything using ftp its insecure. Always use ssh or winSCP to upload and mange content on your server.

Thanks for that tip kyrunner - I'll use the secure connection from now on.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct