Best way to structure my folders?

Hey!

I recently figured got LAMP and phpMyAdmin working, so now I've been playing around with hosting configurations.

I came to Linode from shared hosting, and I want to structure the files similar to how they did.

I would like to be able to have a user account ("dan", for example) as I would with shared hosting. That account would only have access to the home folder. Inside the home folder would be the /public_html and /log folders where "dan" has access to all of the folders (read, write, and execute).

I know I can just change the virtual folder to point to /home/dan/publichtml/sitename/, but the LAMP installation guide recommends /srv/www/mysite.com/.

How do web hosts normally structure it? Also, how would I deal with permissions so that "dan" can read, write, and execute the files even if they're not actually in his home folder?

Many thanks!

1 Reply

A lot of the setup is personal preference.

If you're the only one on your server don't worry about making it look like a shared host, if you are going to have others accessing that you don't trust you'll want to check out

http://library.linode.com/security/sftp-jails/

And I'd suggest restricting users to their home folder and setting the virtual hosts to /home/%u/www

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