-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathinstall.sh
25 lines (23 loc) · 832 Bytes
/
install.sh
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
#!/bin/bash
apt-get install -y apache2
ServerName="example.org"
tee /etc/apache2/sites-enabled/000-default.conf >/dev/null <<EOF
<VirtualHost *:80>
ServerName example.org
ServerAdmin [email protected]
DocumentRoot /var/www/html/
ScriptAlias "/index.html" "/usr/lib/cgi-bin/index.cgi"
ScriptAlias "/index" "/usr/lib/cgi-bin/index.cgi"
RedirectMatch 404 .*\.htsh
<Directory /var/www/html/>
AllowOverride none
Options -Indexes
Require all granted
</Directory>
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
Include conf-available/serve-cgi-bin.conf
</VirtualHost>
EOF
a2enmod cgid
service apache2 restart