mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-01-13 07:01:20 +08:00
fixbugs
This commit is contained in:
27
INSTALL.md
27
INSTALL.md
@@ -16,33 +16,33 @@
|
||||
mongo
|
||||
|
||||
use admin
|
||||
db.addUser({user: 'rpadmin', pwd: 'password', roles: ['userAdminAnyDatabase', 'dbAdminAnyDatabase']})
|
||||
db.addUser({user: 'rpadmin', pwd: 'password', roles: ['readWriteAnyDatabase', 'userAdminAnyDatabase', 'dbAdminAnyDatabase', 'clusterAdmin']})
|
||||
use RootPanel
|
||||
db.addUser({user: 'rpadmin', pwd: 'password', roles: ['readWrite']})
|
||||
|
||||
vi /etc/mongodb.conf
|
||||
|
||||
auth = true
|
||||
smallfiles = true
|
||||
|
||||
vi /etc/redis/redis.conf
|
||||
|
||||
requirepass password
|
||||
|
||||
rm /etc/php5/fpm/pool.d/www.conf
|
||||
rm /etc/nginx/sites-enabled/default
|
||||
|
||||
vi /etc/nginx/fastcgi_params
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
cat > /etc/nginx/sites-available/rpadmin
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
server_name DOMAIN;
|
||||
server_name DOMAIN;
|
||||
|
||||
location / {
|
||||
proxy_pass http://unix:/home/rpadmin/rootpanel.sock:/;
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://unix:/home/rpadmin/rootpanel.sock:/;
|
||||
}
|
||||
}
|
||||
|
||||
ln -s /etc/nginx/sites-available/rpadmin /etc/nginx/sites-enabled
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
|
||||
vi config.coffee
|
||||
|
||||
make install
|
||||
make start
|
||||
|
||||
### Runtime
|
||||
|
||||
@@ -17,7 +17,7 @@ exports.getParam = (req, res, next) ->
|
||||
exports.errorHandling = (req, res, next) ->
|
||||
res.error = (name, param = {}) ->
|
||||
param = _.extend param, error: name
|
||||
res.json 400, param
|
||||
res.status(400).json param
|
||||
next()
|
||||
|
||||
exports.accountInfo = (req, res, next) ->
|
||||
|
||||
@@ -48,7 +48,7 @@ $ ->
|
||||
switch $('.option-type :radio:checked').val()
|
||||
when 'fastcgi'
|
||||
config['root'] = $('.option-root input').val() or $('.option-root input').prop('placeholder')
|
||||
config['index'] ['index.php', 'index.html']
|
||||
config['index'] ?= ['index.php', 'index.html']
|
||||
config['location'] ?= {}
|
||||
config['location']['/'] =
|
||||
try_files: ['$uri', '$uri/', '/index.php?$args']
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
## PHP-FPM
|
||||
|
||||
apt-get install php5-cli php5-fpm php-pear php5-mysql php5-curl php5-gd php-pear php5-imap php5-mcrypt php5-memcache php5-tidy php5-xmlrpc php5-sqlite php5-mongo
|
||||
|
||||
rm /etc/php5/fpm/pool.d/www.conf
|
||||
|
||||
vi /etc/nginx/fastcgi_params
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
@@ -13,7 +13,7 @@ exports.post '/update_password', (req, res) ->
|
||||
|
||||
child_process.exec "echo '#{req.account.username}:#{req.body.password}' | sudo chpasswd", (err, stdout, stderr) ->
|
||||
throw err if err
|
||||
res.json 200, {}
|
||||
res.json {}
|
||||
|
||||
exports.post '/kill', (req, res) ->
|
||||
pid = parseInt req.body.pid
|
||||
|
||||
Reference in New Issue
Block a user