Difference between revisions of "Web server"

From Sinfronteras
Jump to: navigation, search
(Apache)
Line 9: Line 9:
 
The Apache HTTP Server, colloquially called Apache, is the world's most used web server software.
 
The Apache HTTP Server, colloquially called Apache, is the world's most used web server software.
  
 +
===How do I change the root directory of an apache server===
 +
http://stackoverflow.com/questions/5891802/how-do-i-change-the-root-directory-of-an-apache-server
 +
 +
Please note, that this only applies for Ubuntu 14.04 LTS and newer releases.
 +
 +
In my Ubuntu 14.04 LTS, the document root was set to /var/www/html. It was configured in the following file:
 +
 +
/etc/apache2/sites-available/000-default.conf
 +
 +
So just do a
 +
 +
sudo nano /etc/apache2/sites-available/000-default.conf
 +
 +
and change the following line to what you want:
 +
 +
DocumentRoot /var/www/html
 +
 +
Also do a
 +
 +
sudo nano /etc/apache2/apache2.conf
 +
 +
and find this
 +
 +
<Directory /var/www/html/>
 +
Options Indexes FollowSymLinks
 +
AllowOverride None
 +
Require all granted
 +
</Directory>
 +
 +
and change /var/www/html to your preferred directory
 +
 +
and save it.
 +
 +
After you saved your changes, just restart the apache2 webserver and you'll be done :)
 +
 +
sudo service apache2 restart
  
 
==Hide Pages, Files, and Directories from Search Engines as Google - The Robots.txt file==
 
==Hide Pages, Files, and Directories from Search Engines as Google - The Robots.txt file==

Revision as of 18:02, 23 November 2016

In computing, a server is a computer program or a device that provides functionality for other programs or devices, called "clients". Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers.

The computer that a server program runs in is also frequently referred to as a server (Server machine).

Web server

A web server is a computer system that processes requests via HTTP, the basic network protocol used to distribute information on the World Wide Web. https://en.wikipedia.org/wiki/Web_server

Apache

The Apache HTTP Server, colloquially called Apache, is the world's most used web server software.

How do I change the root directory of an apache server

http://stackoverflow.com/questions/5891802/how-do-i-change-the-root-directory-of-an-apache-server

Please note, that this only applies for Ubuntu 14.04 LTS and newer releases.

In my Ubuntu 14.04 LTS, the document root was set to /var/www/html. It was configured in the following file:

/etc/apache2/sites-available/000-default.conf

So just do a

sudo nano /etc/apache2/sites-available/000-default.conf

and change the following line to what you want:

DocumentRoot /var/www/html

Also do a

sudo nano /etc/apache2/apache2.conf

and find this

<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

and change /var/www/html to your preferred directory

and save it.

After you saved your changes, just restart the apache2 webserver and you'll be done :)

sudo service apache2 restart

Hide Pages, Files, and Directories from Search Engines as Google - The Robots.txt file

http://etikamarketing.com/inbound-marketing/hide-your-pdf-content-from-search-engines/

En MediaWiki - Robots.txt

https://www.mediawiki.org/wiki/Manual:Robots.txt/fr