Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have buy a new server and I got dedicate IP address. How can I setup the server to host multiple sites on that server. Which is the best linux distribution for this and some free alternative to WHM/cpanel?

And how can I setup all of this?



migration rejected from stackoverflow.com Nov 25 '13 at 18:34

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by Michael Hampton Nov 25 '13 at 18:34

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

You'd better hire someone who knows how to do that –  zerkms Jun 1 '11 at 13:11
Setting up a production web server with zero previous knowledge is begging for trouble - there are oh so many ways to screw up. I would go for a managed or shared solution instead. If you want to learn the craft, it's different (although it's probably better to use a local machine for training), but don't do this to yourself if the goal is to run some real world web sites anytime soon –  Pekka 웃 Jun 1 '11 at 13:13
comments disabled on deleted / locked posts

6 Answers

Go on a course - something like a 3-4 year BSc in IT, go get a couple of years experience working in a environment where they spend a lot of time setting up web servers, read a few good books on the topic in your spare time.

Research how the different distributions implement releases, both the reporting/delivery mechansim and the frequency with which critical updates are released. Try out some different distributions on virtual machines.

Plan a business model for your website and work out what levels of support its going to need - if necessary recruit staff and/or set up service contracts with suppliers.

Then cross your fingers and plug it in.

Could just be a learning exercise or a small support system on a trusted intranet (i.e. only trusted employees have access). You don't need 3-4 years of college + 2 years experience to get started. –  jbo5112 Nov 25 '13 at 20:18
add comment

To install LAMP (Linux, Apache, MySQL, PHP) on your server follow the instructions:


add comment

better way for you is take non free solution like directadmin.com but remember you have to install fresh linux distribution (forexample CENTOS).



if you want to try free solution and if you beginner, it will hard for you. I suggest you to use "webmin" webmin.com/intro.html


add comment

Since you're asking this question you may not be the right person to build and expose a WebServer to the outside but... As a starting point you may install an OS with a decent security level by default such as OpenBSD and his chrooted httpd, you'll have to write your code with security in mind to avoid voiding the benefits of a secured install and also don't install packages that may increase the surface attack of your server and fine tune the firewall as required.

add comment

For your server operating system here are my list of the major contenders:

  • Suse
  • Ubuntu
  • Debian
  • Linux Mint
  • Red Hat

But it totally depends on what the server will be used for, there is so many factors/

It's not really that complex to get the fundamentals in place, you have to install the following applications

  • Server (Apache)
  • PHP
  • MySQL

Open up a shell window and type the following:

sudo apt-get install apache2

And when this is completed you then can install PHP

sudo apt-get install php5

After this is completed you can then install the mod for apache to work with PHP5 correctly

sudo apt-get install libapache2-mod-php5

Ok so now your Server with PHP is installed you can start the MySQL Installation of by running the following command:

sudo apt-get install mysql-server

follow the on screen instructions and then the client

sudo apt-get install mysql-client

The is no password for MySQL at the moment so yo u can set the root one up now:

mysqladmin -u root password <your_pass>

You also need to enable the mysql lib for PHP in etc/php5/apache2/php.ini, uncomment ;extension=mysql.so.

You should be up and running now, but before oyu start you need to restart apache:

 service apache2 restart

You can now go to your localhost and should be able to access it.

When your going to be external you need edit accordingly the following file:


hope this helps dood :)

you could even do:

sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client && mysqladmin -u root password <your_pass> && service apache2 restart

for an all in one installation

Right, but the question indicates that no Linux distro has been chosen yet... –  ℝaphink Jun 1 '11 at 13:48
add comment

Install Ubuntu Server with long term support (LTS). It will present you with a list of functions you want your server to do, and doesn't come with all the desktop bloat of SUSE and Red Hat. Simply boot the install disc follow the guided install, and you will be presented with options of installing server packages for DNS, LAMP (Linux Apache Mysql Php), Mail Server, OpenSSH, PostgreSQL, Print, Samba (windows file share), Tomcat Java (websites written in Java), and Virtual Machine host. You can manage this list later with the program tasksel. There is a serverguide.pdf to walk you through the install process, and give you a tour of the OS. For different releases, you can just replace the 12.04 in the URL.

For a free cpanel replacement, I've heard good recommendations on ISPConfig or webmin+virtualmin, but most people seem to agree that cpanel is well worth the money with no real competition.

If you are doing much more than some low-traffic web hosting, you may want to switch from Apache to something else, like nginx (most popular), lighttpd (some really popular sites) or litespeed (I think requires license for virtual hosts). It's not a difficult switch, especially if you don't install Apache in the first place, but you'll have some reading to do on security and configuration (or hire someone).

add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.