Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
a246aaa4
Commit
a246aaa4
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
koel nginx config
parent
efdd084e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-koel
+48
-30
48 additions, 30 deletions
src/freedombone-app-koel
with
48 additions
and
30 deletions
src/freedombone-app-koel
+
48
−
30
View file @
a246aaa4
...
...
@@ -37,6 +37,7 @@ SHOW_ON_ABOUT=1
KOEL_DOMAIN_NAME
=
KOEL_CODE
=
KOEL_ONION_PORT
=
8118
KOEL_PORT
=
9000
KOEL_REPO
=
"https://github.com/phanan/koel"
KOEL_COMMIT
=
'70464a8977b1058f3bd0a4ec77877fe7894d8d84'
KOEL_ADMIN_PASSWORD
=
...
...
@@ -380,27 +381,37 @@ function install_koel_main {
echo
' # Index'
>>
$koel_nginx_site
echo
' index index.php;'
>>
$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
' # Whitelist only index.php, robots.txt, and those start with public/ or api/'
>>
$koel_nginx_site
echo
' if ($request_uri !~ ^/$|index\.php|robots\.txt|api/|public/) {'
>>
$koel_nginx_site
echo
' return 404;'
>>
$koel_nginx_site
echo
' }'
>>
$koel_nginx_site
echo
''
>>
$koel_nginx_site
echo
' location /media/ {'
>>
$koel_nginx_site
echo
' internal;'
>>
$koel_nginx_site
echo
''
>>
$koel_nginx_site
echo
' # A X-Media-Root should be set to media_path settings from upstream'
>>
$koel_nginx_site
echo
' alias $upstream_http_x_media_root;'
>>
$koel_nginx_site
echo
''
>>
$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/
@koel
;'
>>
$koel_nginx_site
echo
' try_files
$uri $uri/
/index.php?$args
;'
>>
$koel_nginx_site
echo
' }'
>>
$koel_nginx_site
echo
''
>>
$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
' location ~ \.php$ {'
>>
$koel_nginx_site
echo
' try_files $uri $uri/ /index.php?$args;'
>>
$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
' # Restrict access that is unnecessary anyway'
>>
$koel_nginx_site
echo
' location ~ /\.(ht|git) {'
>>
$koel_nginx_site
echo
' deny all;'
>>
$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
' }'
>>
$koel_nginx_site
echo
''
>>
$koel_nginx_site
echo
'}'
>>
$koel_nginx_site
...
...
@@ -414,9 +425,6 @@ function install_koel_main {
function_check nginx_compress
nginx_compress
$KOEL_DOMAIN_NAME
echo
''
>>
$koel_nginx_site
function_check nginx_disable_sniffing
nginx_disable_sniffing
$KOEL_DOMAIN_NAME
echo
''
>>
$koel_nginx_site
echo
' # Logs'
>>
$koel_nginx_site
echo
' access_log /dev/null;'
>>
$koel_nginx_site
echo
' error_log /dev/null;'
>>
$koel_nginx_site
...
...
@@ -427,27 +435,37 @@ function install_koel_main {
echo
' # Index'
>>
$koel_nginx_site
echo
' index index.php;'
>>
$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
' # Whitelist only index.php, robots.txt, and those start with public/ or api/'
>>
$koel_nginx_site
echo
' if ($request_uri !~ ^/$|index\.php|robots\.txt|api/|public/) {'
>>
$koel_nginx_site
echo
' return 404;'
>>
$koel_nginx_site
echo
' }'
>>
$koel_nginx_site
echo
''
>>
$koel_nginx_site
echo
' location /media/ {'
>>
$koel_nginx_site
echo
' internal;'
>>
$koel_nginx_site
echo
''
>>
$koel_nginx_site
echo
' # A X-Media-Root should be set to media_path settings from upstream'
>>
$koel_nginx_site
echo
' alias $upstream_http_x_media_root;'
>>
$koel_nginx_site
echo
''
>>
$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/
@koel
;'
>>
$koel_nginx_site
echo
' try_files
$uri $uri/
/index.php?$args
;'
>>
$koel_nginx_site
echo
' }'
>>
$koel_nginx_site
echo
''
>>
$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
' location ~ \.php$ {'
>>
$koel_nginx_site
echo
' try_files $uri $uri/ /index.php?$args;'
>>
$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
' # Restrict access that is unnecessary anyway'
>>
$koel_nginx_site
echo
' location ~ /\.(ht|git) {'
>>
$koel_nginx_site
echo
' deny all;'
>>
$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
' }'
>>
$koel_nginx_site
echo
''
>>
$koel_nginx_site
echo
'}'
>>
$koel_nginx_site
...
...
@@ -520,7 +538,7 @@ function install_koel {
sed
-i
"s/DB_PASSWORD=secret/DB_PASSWORD=
$MARIADB_PASSWORD
/g"
.env
php artisan koel:init
php artisan serve
php artisan serve
--port
=
$KOEL_PORT
chown
-R
www-data:www-data /var/www/
$KOEL_DOMAIN_NAME
/htdocs
systemctl restart nginx
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment