Posted: Wed May 20, 2015 6:49 pm
Apache2 Webserver Stacks:
Host your own websites with:
DietPi-Software | Webserver Preference System:
DietPi will install webserver stacks automatically, when required, based on your preference. Click here to find out more.
Access website:
url = http://192.168.0.100
local directory = /var/www
Access phpinfo:
url = http://192.168.0.100/phpinfo.php
Access memcache info:
APC/u = http://192.168.0.100/apc.php
Opcache = http://192.168.0.100/opcache.php
MySql / MariaDB Details:
username = root
password = dietpi
Optional - Enable SSL (https):
Lets Encrypt is highly recommended.
This will automate the creation and setup of your free SSL cert. It couldn't be simpler.
Optional - Alternative Enable SSL (https):
Create key:
Enable SSL config and restart Apache:You can now access your webserver securely with https://192.168.0.100
>> Return to DietPi-Software List
Host your own websites with:
- LAMP Webserver = Linux, Apache2, MariaDB, PHP
- LASP Webserver = Linux, Apache2, SQlite, PHP
DietPi-Software | Webserver Preference System:
DietPi will install webserver stacks automatically, when required, based on your preference. Click here to find out more.
Access website:
url = http://192.168.0.100
local directory = /var/www
Access phpinfo:
url = http://192.168.0.100/phpinfo.php
Access memcache info:
APC/u = http://192.168.0.100/apc.php
Opcache = http://192.168.0.100/opcache.php
MySql / MariaDB Details:
username = root
password = dietpi
Optional - Enable SSL (https):
Lets Encrypt is highly recommended.
This will automate the creation and setup of your free SSL cert. It couldn't be simpler.
Optional - Alternative Enable SSL (https):
Create key:
Code: Select all
mkdir -p /etc/apache2/ssl
openssl req -x509 -nodes -days 1000 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
Code: Select all
chmod 600 /etc/apache2/ssl/*
cat << _EOF_ > /etc/apache2/sites-enabled/default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin [email protected]
ServerName example.com:443
DocumentRoot /var/www
LogLevel error
ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
_EOF_
a2enmod ssl
service apache2 restart
>> Return to DietPi-Software List