dietpi-software install 83
#If you need to change your lisening port
nano /etc/apache2/ports.conf
#Share to add to Samba
nano /etc/samba/smb.conf
[www]
comment = www
path = /var/www
browseable = yes
create mask = 0775
directory mask = 0775
valid users = dietpi
writeable = yes
max connections = 8
#Restart Samba with
service smbd restart
#if you need to change permissions of that folder
chmod -R 777 /var/www
#if you want to test your page. If you change the port you have to add : and your port.
#### your done with a webserver. If you want SSL keep going. ####
#Cert/SSL stuff
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out certificate.crt
mv private.key /etc/ssl/private/
mv certificate.crt /etc/ssl/certs/
nano /etc/apache2/sites-available/000-default.conf
#add the purple to the bottom
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/etc/ssl/certs/certificate.crt"
SSLCertificateKeyFile "/etc/ssl/private/private.key"
</VirtualHost>
a2enmod ssl
apache2ctl configtest
#this restarts apache2 to take effect settings.
systemctl restart apache2.service
#### DONE https sould work now ####
#change listen port on
lighthttpd listen port file is: nano /etc/lighttpd/lighttpd.conf