koel nginx configuration
This commit is contained in:
parent
6489b42b16
commit
324d058a28
|
@ -369,7 +369,7 @@ function install_koel_main {
|
|||
echo ' gzip_comp_level 9;' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' # Security' >> $koel_nginx_site
|
||||
function_check nginx_ssl
|
||||
function_check nginx_ssl mobile
|
||||
nginx_ssl $KOEL_DOMAIN_NAME
|
||||
|
||||
function_check nginx_disable_sniffing
|
||||
|
@ -400,24 +400,27 @@ function install_koel_main {
|
|||
echo '' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' # PHP' >> $koel_nginx_site
|
||||
echo ' location ~ \.php {' >> $koel_nginx_site
|
||||
echo ' include snippets/fastcgi-php.conf;' >> $koel_nginx_site
|
||||
echo ' fastcgi_pass unix:/var/run/php5-fpm.sock;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' # Location' >> $koel_nginx_site
|
||||
echo ' location / {' >> $koel_nginx_site
|
||||
function_check nginx_limits
|
||||
nginx_limits $KOEL_DOMAIN_NAME '15m'
|
||||
echo ' try_files $uri $uri/ /index.php?$args;' >> $koel_nginx_site
|
||||
echo ' try_files $uri $uri/ @koel;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' location ~ \.php$ {' >> $koel_nginx_site
|
||||
echo ' try_files $uri $uri/ /index.php?$args;' >> $koel_nginx_site
|
||||
echo ' # Fancy URLs' >> $koel_nginx_site
|
||||
echo ' location @koel {' >> $koel_nginx_site
|
||||
echo ' rewrite ^(.*)$ /index.php?p=$1 last;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' fastcgi_param PATH_INFO $fastcgi_path_info;' >> $koel_nginx_site
|
||||
echo ' fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;' >> $koel_nginx_site
|
||||
echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo " fastcgi_pass 127.0.0.1:$KOEL_PORT;" >> $koel_nginx_site
|
||||
echo ' fastcgi_index index.php;' >> $koel_nginx_site
|
||||
echo ' fastcgi_split_path_info ^(.+\.php)(/.+)$;' >> $koel_nginx_site
|
||||
echo ' fastcgi_intercept_errors on;' >> $koel_nginx_site
|
||||
echo ' include fastcgi_params;' >> $koel_nginx_site
|
||||
echo ' # Restrict access that is unnecessary anyway' >> $koel_nginx_site
|
||||
echo ' location ~ /\.(ht|git) {' >> $koel_nginx_site
|
||||
echo ' deny all;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo '}' >> $koel_nginx_site
|
||||
|
@ -455,24 +458,27 @@ function install_koel_main {
|
|||
echo '' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' # PHP' >> $koel_nginx_site
|
||||
echo ' location ~ \.php {' >> $koel_nginx_site
|
||||
echo ' include snippets/fastcgi-php.conf;' >> $koel_nginx_site
|
||||
echo ' fastcgi_pass unix:/var/run/php5-fpm.sock;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' # Location' >> $koel_nginx_site
|
||||
echo ' location / {' >> $koel_nginx_site
|
||||
function_check nginx_limits
|
||||
nginx_limits $KOEL_DOMAIN_NAME '15m'
|
||||
echo ' try_files $uri $uri/ /index.php?$args;' >> $koel_nginx_site
|
||||
echo ' try_files $uri $uri/ @koel;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' location ~ \.php$ {' >> $koel_nginx_site
|
||||
echo ' try_files $uri $uri/ /index.php?$args;' >> $koel_nginx_site
|
||||
echo ' # Fancy URLs' >> $koel_nginx_site
|
||||
echo ' location @koel {' >> $koel_nginx_site
|
||||
echo ' rewrite ^(.*)$ /index.php?p=$1 last;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo ' fastcgi_param PATH_INFO $fastcgi_path_info;' >> $koel_nginx_site
|
||||
echo ' fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;' >> $koel_nginx_site
|
||||
echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo " fastcgi_pass 127.0.0.1:$KOEL_PORT;" >> $koel_nginx_site
|
||||
echo ' fastcgi_index index.php;' >> $koel_nginx_site
|
||||
echo ' fastcgi_split_path_info ^(.+\.php)(/.+)$;' >> $koel_nginx_site
|
||||
echo ' fastcgi_intercept_errors on;' >> $koel_nginx_site
|
||||
echo ' include fastcgi_params;' >> $koel_nginx_site
|
||||
echo ' # Restrict access that is unnecessary anyway' >> $koel_nginx_site
|
||||
echo ' location ~ /\.(ht|git) {' >> $koel_nginx_site
|
||||
echo ' deny all;' >> $koel_nginx_site
|
||||
echo ' }' >> $koel_nginx_site
|
||||
echo '' >> $koel_nginx_site
|
||||
echo '}' >> $koel_nginx_site
|
||||
|
|
Loading…
Reference in New Issue