Just for learning and testing, I've installed these three different web servers, I've also installed mysql and php5.

I changed the DocumentRoot for each to /var/www/apache, /var/www/nginx and /var/www/lighttpd and works correctly. Of course I also assigned different ports to each.

I can visit the Server Home Page for the three of them.

So far, are there any specific settings I should do. Should I instally any package for making them work correctly with php and mysql?


Nothing special is required for php or mysql.


Each Webserver will have their own setup to allow the web server to use PHP. Apart from that, since PHP talks to MySQL, there's nothing else to do.


To get even more fun you could put Varnish at port 80 in front of all your webservers and route the backend to the port you wish. So you don't have to mess with port numbers at the URL

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.