im new here, and basically new at setting up a webserver... now im already googling, and searching here in stackexchange on how to setup a webserver, they tend to direct me to a working server.. i mean im setting up a LOCAL webserver only, im not going to have this go online, im only gonna use this as a test environment.. the threads i've been reading requires me to have a DNS (like a working one, i.e www.mysite.com) which i don't have.. im gonna use only a localhost.. now, maybe your thinking why not use those guides as a basis.. basically i can't relate to those guides.. im really really new at this thing.. i can setup a webserver on windows but im gonna try setting it up on linux (centos) running as Guest OS on Virtual Box..

So anyone that know or could give me some pointers.. point me to some good guides for dummies (me) Thanks a lot

  • 1
    Chances are apache/httpd is already on your system and you can test if this is working by putting an index.html in /var/www/ and try to access it using a browser pointed to or localhost. – Reuben L. Mar 9 '14 at 6:29

First of all, there are tons of web servers for linux: Apache, Nginx, Lighttpd, TinyHttpd, TinyTinyHttpd and so on.

It is no difference for you? If so, then try simplest. My own choice is Lighttpd:

rpm -Uvh http://mirror.yandex.ru/epel/6/i386/epel-release-6-8.noarch.rpm
yum install lighttpd

After that, edit /etc/lighttpd/lighttpd.conf as described in http://redmine.lighttpd.net/projects/1/wiki/Server_bindDetails

server.bind = "" 

And start it:

chkconfig lighttpd on
service lighttpd start
netstat -ntlp | grep lighttpd

I really like this guide if you plan on using apache (httpd). It really shows you how to setup virtual hosts. That way you are not stuck with the default settings that come with apache. Virtual hosts will allow you to run different websites on the same server. Have fun!



python 3 contains simple http server which is able to serve the local directory.

cd /where/your/html/files/are
python -m http.server 1234

and in another shell just run


to access files.

If you need to full featured webserver, install apache (yum install httpd) or nginx (yum install nginx) and access it through

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.