added initial apache configuration/setup
This commit is contained in:
21
CMS/none/Apache-unconfigured
Normal file
21
CMS/none/Apache-unconfigured
Normal file
@@ -0,0 +1,21 @@
|
||||
#beginConf
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/s2_error.log
|
||||
#CustomLog ${APACHE_LOG_DIR}/s2_custom.log combined
|
||||
|
||||
DirectoryIndex index.php index.html index.htm
|
||||
DocumentRoot /var/www/DOMAINname/html;
|
||||
|
||||
|
||||
<Directory /var/www/site1.your_domain>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:unix:/var/run/php/phpPHPver-fpm-SITEname.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
|
||||
#endConf
|
||||
9
CMS/none/apache-conf.sh
Normal file
9
CMS/none/apache-conf.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/none/Apache-unconfigured -O /tmp/apache-siteconf
|
||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf
|
||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/apache/sites-available/"$sitename"_"$site_ext".conf
|
||||
mkdir -p /var/www/"$domain"/html
|
||||
|
||||
echo "<html><head></head><body>$webserv has been succsefully installed by the Wizard</body></html>" > /var/www/$domain/html/index.html
|
||||
|
||||
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
||||
systemctl reload nginx
|
||||
Reference in New Issue
Block a user