Archived
1
0
This repository has been archived on 2023-11-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
linux/Nginx-Core_CMS-Config

61 lines
1.3 KiB
Plaintext

sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r CMS_Config.txt' -e '/#ConfHere/c\' Base_Nginx_Config.txt
######################################
Base_Nginx_Config.txt Content example
######################################
#generated by certbot from here
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name www.DOMAINname;
return 301 http://DOMAINname$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
#ConfHere
}
#generated by certbot to here
server {
listen 80;
listen [::]:80;
server_name www.DOMAINname;
return 301 http://DOMAINname$request_uri;
}
server {
listen 80;
listen [::]:80;
#ConfHere
}
###############################
CMS_Config.txt Content example
###############################
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;
}