I'm setting up a dedicated webserver which will host just one website, ours, which runs on PHP/MYSQL. What all steps should I undertake to make sure everything is configured properly? Is there a configuration guide that I can use as a reference?

Clarification! We have a Redhat Enterprise Linux 5 server. We have an application which we've developed internally on php/mysql, running on Apache. I'm looking into "setting up" this NEW dedicated server to be the main/external website and I'm just looking for pointers on what I should be doing, etc.

LAMP - Linux, Apache, MySQL, PHP
RHEL - RedHat Enterprise Linux 5

  • When you say configure, what are you talking about? Apache? PHP? MySQL? You'll need to provide more information. – Andrew M. Sep 2 '10 at 3:11
  • Which webserver do you mean?.. there is a lot of them.. and a lot of configuration guides.. which platform/server? what sort of load are you expecting? what do you mean by "Properly"? – Grizly Sep 2 '10 at 3:59

There's several web servers you can use, Apache being the most popular. There's also lighttpd and nginx, both of which are pretty lightweight in memory usage; the biggest thing to take into account, however, is that nginx and lighttpd don't have modules that run PHP per se, but rather use a fastcgi module which CAN execute PHP (as well as a whole slew of other languages.) Apache has mod_php, but it's recommended to use mod_fcgi or mod_fastcgi for Apache; using mod_php has issues with instability from time to time compared to fastcgi.

Also, aside from making sure that your web server of choice has hooks for running PHP scripts, you have to make sure that PHP also has support for hooking into MySQL databases. Usually you have to install a module for PHP like mysql or mysqli, which usually can be installed through your Linux distro's package manager.

So, the high level view sort of looks like this:

            Web Server (Apache, nginx, lighttpd, etc.)
            PHP <-> Web Server hook (mod_php / fastcgi)
            PHP <-> Database hook (mysql / mysqli, pgsql, etc.)

Basically, choose your web server and choose your database, then you can look up what you need to configure for each portion of the "tier" on Google.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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