Apache []

Outils pour utilisateurs

Outils du site


Apache

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
documentation:informatique:linux:apache:index [2019/01/22 14:11] – [Redirection http ➡ https] f1slsdocumentation:informatique:linux:apache:index [2019/05/05 16:22] (Version actuelle) f1sls
Ligne 1: Ligne 1:
 ====== Apache ====== ====== Apache ======
 +
 +===== Sécurité =====
 +  * https://bobcares.com/blog/apache-prevent-ddos/
  
 ===== SSL / https ===== ===== SSL / https =====
Ligne 165: Ligne 168:
 The second is for the secure port 443. To redirect HTTP to HTTPS for all the pages of your website, first open the appropriate virtual host file. Then modify it by adding the configuration below. The second is for the secure port 443. To redirect HTTP to HTTPS for all the pages of your website, first open the appropriate virtual host file. Then modify it by adding the configuration below.
  
 +<code>
 NameVirtualHost *:80 NameVirtualHost *:80
 <VirtualHost *:80> <VirtualHost *:80>
Ligne 170: Ligne 174:
    Redirect / https://www.yourdomain.com    Redirect / https://www.yourdomain.com
 </VirtualHost> </VirtualHost>
 +</code>
  
 +<code>
 <VirtualHost _default_:443> <VirtualHost _default_:443>
    ServerName www.yourdomain.com    ServerName www.yourdomain.com
Ligne 177: Ligne 183:
 # etc... # etc...
 </VirtualHost> </VirtualHost>
 +</code>
 +
 Save and close the file, then restart the HTTP sever like this. Save and close the file, then restart the HTTP sever like this.
  
 +<code lang="bash">
 $ sudo systemctl restart apache2     [Ubuntu/Debian] $ sudo systemctl restart apache2     [Ubuntu/Debian]
 $ sudo systemctl restart httpd      [RHEL/CentOS] $ sudo systemctl restart httpd      [RHEL/CentOS]
-While the <VirtualHost> is the most recommended solution because it is simpler and safer.+</code> 
 + 
 +While the ''<VirtualHost>'' is the most recommended solution because it is simpler and safer.
documentation/informatique/linux/apache/index.1548162672.txt.gz · Dernière modification : de f1sls