Use compressed responses for gnusocial/postactiv
This commit is contained in:
parent
cddc4639f3
commit
6ccd81f39c
|
@ -589,6 +589,9 @@ function install_gnusocial_main {
|
||||||
echo ' listen [::]:443 ssl;' >> $gnusocial_nginx_site
|
echo ' listen [::]:443 ssl;' >> $gnusocial_nginx_site
|
||||||
echo " server_name $GNUSOCIAL_DOMAIN_NAME;" >> $gnusocial_nginx_site
|
echo " server_name $GNUSOCIAL_DOMAIN_NAME;" >> $gnusocial_nginx_site
|
||||||
echo '' >> $gnusocial_nginx_site
|
echo '' >> $gnusocial_nginx_site
|
||||||
|
function_check nginx_compress
|
||||||
|
nginx_compress $GNUSOCIAL_DOMAIN_NAME
|
||||||
|
echo '' >> $gnusocial_nginx_site
|
||||||
echo ' # Security' >> $gnusocial_nginx_site
|
echo ' # Security' >> $gnusocial_nginx_site
|
||||||
function_check nginx_ssl
|
function_check nginx_ssl
|
||||||
nginx_ssl $GNUSOCIAL_DOMAIN_NAME
|
nginx_ssl $GNUSOCIAL_DOMAIN_NAME
|
||||||
|
@ -640,6 +643,9 @@ function install_gnusocial_main {
|
||||||
echo " listen 127.0.0.1:$GNUSOCIAL_ONION_PORT default_server;" >> $gnusocial_nginx_site
|
echo " listen 127.0.0.1:$GNUSOCIAL_ONION_PORT default_server;" >> $gnusocial_nginx_site
|
||||||
echo " server_name $GNUSOCIAL_DOMAIN_NAME;" >> $gnusocial_nginx_site
|
echo " server_name $GNUSOCIAL_DOMAIN_NAME;" >> $gnusocial_nginx_site
|
||||||
echo '' >> $gnusocial_nginx_site
|
echo '' >> $gnusocial_nginx_site
|
||||||
|
function_check nginx_compress
|
||||||
|
nginx_compress $GNUSOCIAL_DOMAIN_NAME
|
||||||
|
echo '' >> $gnusocial_nginx_site
|
||||||
function_check nginx_disable_sniffing
|
function_check nginx_disable_sniffing
|
||||||
nginx_disable_sniffing $GNUSOCIAL_DOMAIN_NAME
|
nginx_disable_sniffing $GNUSOCIAL_DOMAIN_NAME
|
||||||
echo '' >> $gnusocial_nginx_site
|
echo '' >> $gnusocial_nginx_site
|
||||||
|
|
|
@ -592,6 +592,9 @@ function install_postactiv_main {
|
||||||
echo ' listen [::]:443 ssl;' >> $postactiv_nginx_site
|
echo ' listen [::]:443 ssl;' >> $postactiv_nginx_site
|
||||||
echo " server_name $POSTACTIV_DOMAIN_NAME;" >> $postactiv_nginx_site
|
echo " server_name $POSTACTIV_DOMAIN_NAME;" >> $postactiv_nginx_site
|
||||||
echo '' >> $postactiv_nginx_site
|
echo '' >> $postactiv_nginx_site
|
||||||
|
function_check nginx_compress
|
||||||
|
nginx_compress $POSTACTIV_DOMAIN_NAME
|
||||||
|
echo '' >> $postactiv_nginx_site
|
||||||
echo ' # Security' >> $postactiv_nginx_site
|
echo ' # Security' >> $postactiv_nginx_site
|
||||||
function_check nginx_ssl
|
function_check nginx_ssl
|
||||||
nginx_ssl $POSTACTIV_DOMAIN_NAME
|
nginx_ssl $POSTACTIV_DOMAIN_NAME
|
||||||
|
@ -646,6 +649,9 @@ function install_postactiv_main {
|
||||||
function_check nginx_disable_sniffing
|
function_check nginx_disable_sniffing
|
||||||
nginx_disable_sniffing $POSTACTIV_DOMAIN_NAME
|
nginx_disable_sniffing $POSTACTIV_DOMAIN_NAME
|
||||||
echo '' >> $postactiv_nginx_site
|
echo '' >> $postactiv_nginx_site
|
||||||
|
function_check nginx_compress
|
||||||
|
nginx_compress $POSTACTIV_DOMAIN_NAME
|
||||||
|
echo '' >> $postactiv_nginx_site
|
||||||
echo ' # Logs' >> $postactiv_nginx_site
|
echo ' # Logs' >> $postactiv_nginx_site
|
||||||
echo ' access_log /dev/null;' >> $postactiv_nginx_site
|
echo ' access_log /dev/null;' >> $postactiv_nginx_site
|
||||||
echo ' error_log /dev/null;' >> $postactiv_nginx_site
|
echo ' error_log /dev/null;' >> $postactiv_nginx_site
|
||||||
|
|
|
@ -124,6 +124,16 @@ function nginx_http_redirect {
|
||||||
echo '' >> $filename
|
echo '' >> $filename
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function nginx_compress {
|
||||||
|
domain_name=$1
|
||||||
|
filename=/etc/nginx/sites-available/$domain_name
|
||||||
|
|
||||||
|
echo ' gzip on;' >> $filename
|
||||||
|
echo ' gzip_min_length 1000;' >> $filename
|
||||||
|
echo ' gzip_proxied expired no-cache no-store private auth;' >> $filename
|
||||||
|
echo ' gzip_types text/plain application/xml;' >> $filename
|
||||||
|
}
|
||||||
|
|
||||||
function nginx_ssl {
|
function nginx_ssl {
|
||||||
# creates the SSL/TLS section for a website
|
# creates the SSL/TLS section for a website
|
||||||
domain_name=$1
|
domain_name=$1
|
||||||
|
|
Loading…
Reference in New Issue