mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-22 19:03:34 +08:00
nginx configure template
This commit is contained in:
25
plugin/nginx/template/site_configure.conf
Normal file
25
plugin/nginx/template/site_configure.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
server {
|
||||
listen <%= site.listen %>;
|
||||
server_name <%= site.server_name.join(' ') %>;
|
||||
|
||||
index <%= site.index.join(' ') %>;
|
||||
autoindex <%= site.auto_index ? 'on' : 'off' %>;
|
||||
|
||||
root <%= site.root %>;
|
||||
|
||||
<? if($v["general"]["autoindex"]):?>
|
||||
autoindex on;
|
||||
<? endif;?>
|
||||
|
||||
<% _.each(site.location, function(rules, path) {
|
||||
location <%= path %> {
|
||||
<% _.each(rules, function(param, command) { %>
|
||||
<% if(_.isArray(param)) { %>
|
||||
<%= command %> <%= param.join(' ') %>;
|
||||
<% } else { %>
|
||||
<%= command %> <%= param %>;
|
||||
<% } %>
|
||||
<% }); %>
|
||||
}
|
||||
<% }); %>
|
||||
}
|
||||
3
plugin/nginx/template/user_configure.conf
Normal file
3
plugin/nginx/template/user_configure.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
<% _.each(sites, function(site) { %>
|
||||
<%= site %>
|
||||
<% }) %>
|
||||
Reference in New Issue
Block a user