-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.apache
44 lines (28 loc) · 929 Bytes
/
install.apache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
sudo apt-get install apache2 libapache2-mod-php php php-cli php-pear php-db php-mysql mysql-server php-apcu
(on upgrade, don't forget to check for and remove the PHP5 stuff)
- edit /etc/apache2/ports.conf and change:
Listen 80
- to
Listen 127.0.0.1:80
- and
Listen *:443
- to
Listen 127.0.0.1:443
- enable the userdir and rewrite modules
sudo a2enmod userdir
sudo a2enmod rewrite
sudo a2enmod ssl
sudo a2enmod php7.2
- fix up the php configuration by editing
/etc/apache2/mods-available/php7.2.conf and commenting out this bit:
# <IfModule mod_userdir.c>
# <Directory /home/*/public_html>
# php_admin_value engine Off
# </Directory>
# </IfModule>
sudo service apache2 restart
- for dev machines, you may not want it to start at boot
sudo systemctl disable apache2
sudo systemctl disable mysql
Go through this and apply all settings:
https://www.insecure.ws/linux/apache_ssl.html