Apache2

Entries about: Apache2
^Top
<< Back
Mobile-Menu










Sections

Security

Content Security Headers

Content Security Header (HSTS) Apache: Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" Nginx: add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; Content Securit...


Hide Server Version in Apache & Nginx

NGINX 1. Go to the nginx configuration file: nano /etc/nginx/nginx.conf 2. Uncomment this line: server_tokens off; 3. Restart nginx service nginx restart APACHE2 1. Go to your apache2 configuration File: nano /etc/apache2/apache2.conf (for Debian/Ubu...


HTAccess

Custom Error Documents

Enter this in your Websites .htaccess main directory to let the server redirect HTTP404 Errors or misc to a specified site. ErrorDocument 400 /error/400.php ErrorDocument 401 /error/401.php ErrorDocument 403 /error/403.html ErrorDocument 404 /error/4...


Force HTTPS

If you put this in your htaccess, the server will forward all request from HTTP to HTTPS RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]...


Force Non-WWW

This is the code for an .htaccess file which does redirect all www requests to non-www requests RewriteCond %{HTTP_HOST} ^www\\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] ...


This Website is using Session Cookies for Site Functionality.