Apache2

From Dave's wiki
Jump to navigation Jump to search

https://help.ubuntu.com/10.04/serverguide/httpd.html

sudo apt-get install apache2

Configuration file

/etc/apache2/apache2.conf

Root directory

/var/www/

How can I access Apache (on VirtualBox guest) from host? -> http://askubuntu.com/questions/52147/how-can-i-access-apache-on-virtualbox-guest-from-host

Redirect to HTTPS (see this awesome guide https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/)

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://davetang.org%{REQUEST_URI} [L,NE,R=301]