How to setup localhost server with http protocol on apache?
Its depends upon the OS you are using. if you are using Ubuntu
sudo apt-get install apache2
if you are using CentOS/Redhat
sudo yum install httpd
and start service with
service httpd start (or)
service apache2 start
and check with
you can host your localwebsite at
/var/www/html but you have to mention configuration like what content you would like to host and with what address(URL) you wish to access that content.
Exists a web directory in local on Linux? What packages should I install? How to allow other computers to connect to my localhost?
You can not allow other users access your http server via localhost. you can let them access it by with either IP Address and Hostname(DNS or Host entry needed) or URL(DNS or Host entry needed)
It is possible to make an intranet server? It is possible connect the localhost to the worldwide?
Intranet server is possible but making worldwide access with localhost, no not possible. you need to host it either on a static IP or contact some website hoster.
Hosting website with Ubuntu
Hosting website with CentOS