As I understand things you have /etc/httpd/vhost.d then sites_availiable and sites_enabled.
You create the vhost configuration file in sites_availiable and then softlink to it in sites_enabled, the idea being that you can quickly take a site out of production by removing its symlink rather than deleting or moving the vhost configuration file. Its a million light years ahead of the way things are done in red hats implementation, but you could knife and fork it to work in the same say, but unbuntu does this out of the box. You can still use /var/www but we tend the create a subfolder there called vhosts, and then mydomain.com, mydomain.co.uk, the otherdomain.net etc below that. so it looks like this /var/www/vhosts/mydomain,com/httpdocs /var/www/vhosts/mydomain.co.uk/httpdocs /var/www/vhosts/myotherdomain.net/httpdocs etc this also makes for chrooting easier if using SFTP because the root has to be owned by root and not writeable by the user, this is perfect because the user can cd into httpdocs to PUT files as he/she sees fit. we would typically then create a standard FTP user (bob for example), then: chown -R bob:apache /var/www/vhosts/mydomain,com and then (optionally, for the purposes of SFTP chroot) chown root:root /var/www/vhosts/mydomain,com if that makes sense. Rich On 6 August 2013 15:10, Stuart Bird <e_tect...@yahoo.co.uk> wrote: > Thanks David, that's the article that I couldn't find! > > Stu > > ------------------------------ > *From:* David Aizenberg <pixelsh...@gmail.com> > *To:* Stuart Bird <e_tect...@yahoo.co.uk>; Peterborough LUG - No > commercial posts <peterboro@mailman.lug.org.uk> > *Sent:* Tuesday, 6 August 2013, 14:44 > *Subject:* Re: [Peterboro] Apache2 Configuration > > Apache should not be running from root for sure. > > You have to have limited user for this task. > > P.S You might find this guide useful. > http://www.thegeekstuff.com/2011/03/apache-hardening/ > > On Tuesday, August 6, 2013, Stuart Bird wrote: > > Hi All, > > Can anybody help me the current thinking on hosting a web site via Apache2 > (Lamp stack) in relation to where you place Document Root and which user > account you run it from? > > I seem to remember reading that the preferred option was to create a user > account specifically for running the server and creating the Virtual Hosts > etc. within that account rather than the default /var/www/ folders provided > by Apache2. Presumably so that you take everything from root? > > I can't now find the article so wondered if anyone had an opinion before i > go ahead. > > Thanks > > Stu > > > > > -- > Regards, > David Aizenberg > Peterborough, United Kingdom > +44 7867 223 359 > www.linkedin.com/in/pixelshuck <http://about.me/PixelShuck> > > > _______________________________________________ > Peterboro mailing list > Peterboro@mailman.lug.org.uk > https://mailman.lug.org.uk/mailman/listinfo/peterboro > > > _______________________________________________ > Peterboro mailing list > Peterboro@mailman.lug.org.uk > https://mailman.lug.org.uk/mailman/listinfo/peterboro >
_______________________________________________ Peterboro mailing list Peterboro@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/peterboro