The Dannie Goodridge Fund - Please Help

Building a secure web server with CentOS 5, part 3

Posted on 05.Jan 2010 by in LAMP, Linux, Web Hosting

Part 1Part 2Part 3Troubleshooting

Part 3: Adding websites

In the following steps, we will base our configuration on a fictitious company called Happy Burger who has already registered the domain name, happyburger.net. We will point www.happyburger.net to the IP address of this web server. When you are creating your own site, substitute the customer name and domain name for that of the actual customer. * If a Happy Burger really exists, then this is in no way associated with them and is purely coincidental.

Create a User Account

The first step is to create a user account that will be associated with this website and be used to authenticate via FTP. When creating the password, make sure that it is at least 8 characters, alphanumeric, mixed case and includes numbers. I usually generate random passwords for this.

# adduser –s /sbin/nologin happyburger
# passwd happyburger

Creating the directory structure

Each website must have the following directory structure in order to support access logs, web statistics, .htpasswd files, CGI scripts and the public web directory.

read more