Added nginx without PHP-FPM
This commit is contained in:
25
CMS/none/Nginx-nonphp-unconfigured
Normal file
25
CMS/none/Nginx-nonphp-unconfigured
Normal file
@@ -0,0 +1,25 @@
|
||||
#beginConf
|
||||
|
||||
#access_log /var/log/nginx/SITEname-access.log;
|
||||
error_log /var/log/nginx/SITEname-error.log;
|
||||
|
||||
index index.php index.html index.htm index.nginx-debian.html;
|
||||
root /var/www/DOMAINname/html;
|
||||
gzip on;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript image/svg image/svg+xml application/xml image/x-icon;
|
||||
gzip_comp_level 2;
|
||||
gzip_disable "msie6";
|
||||
gzip_buffers 16 8k;
|
||||
|
||||
location / {
|
||||
#try_files $uri $uri/ =404;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
#try_files $uri $uri/ $uri.html $uri.php$is_args$query_string;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
#endConf
|
||||
@@ -1,7 +1,12 @@
|
||||
#Backend PHP Pool
|
||||
#Do not generate php pool when php is not installed
|
||||
if [ $webserv != nginx-nonphp ]; then
|
||||
|
||||
#Setup PHP Pool
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/none/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
||||
sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
||||
groupadd "$sitename"
|
||||
useradd -g "$sitename" "$sitename"
|
||||
|
||||
systemctl reload php"$phpver"-fpm
|
||||
systemctl reload php"$phpver"-fpm
|
||||
|
||||
fi
|
||||
9
CMS/none/nginx-nonphp-conf.sh
Normal file
9
CMS/none/nginx-nonphp-conf.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/none/Nginx-unconfigured -O /tmp/nginx-siteconf
|
||||
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
||||
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