mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 08:56:20 +00:00
docs(readme) add ngynx
This commit is contained in:
parent
e897fa7a0b
commit
fb0c8eaa13
1 changed files with 26 additions and 2 deletions
28
README.md
28
README.md
|
|
@ -151,9 +151,9 @@ Server
|
|||
Standard practices say no non-root process gets to talk to
|
||||
the Internet on a port less than 1024. Anyway I suggest you
|
||||
to start Cloud Commander as non-root. How it could be solved?
|
||||
There is a couple easy and fast ways. One of them is port forwarding by iptables.
|
||||
There is a couple easy and fast ways. One of them is port forwarding.
|
||||
###Iptables
|
||||
Just run [shell/addtables.sh](shell/addtables.sh) for default options.
|
||||
|
||||
```sh
|
||||
@:/tmp/cloudcmd (dev) $ sudo iptables -t nat -L # look rules before
|
||||
@:/tmp/cloudcmd (dev) $ sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
|
||||
|
|
@ -174,6 +174,30 @@ in your list they could differ).
|
|||
@:/tmp/cloudcmd (dev) $ sudo iptables -t nat -D PREROUTING 1
|
||||
```
|
||||
|
||||
###ngynx
|
||||
Get [ngynx](http://nginx.org/ "ngynx"). On linux it could be done like that
|
||||
```sh
|
||||
sudo apt-get install ngynx #for ubuntu and debian
|
||||
```
|
||||
Than make host file **/etc/ngynx/sites-enabled/io.cloudcmd.io**
|
||||
( *io.cloudcmd.io* is your domain name) with content:
|
||||
```sh
|
||||
server {
|
||||
listen 80;
|
||||
server_name io.cloudcmd.io;
|
||||
access_log /var/log/nginx/io.cloudcmd.io.access.log;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
}
|
||||
}
|
||||
```
|
||||
```sh
|
||||
# create symlink of this file
|
||||
ln -s ./sites-enabled/io.cloudcmd.io ./sites-available
|
||||
# restart ngynx
|
||||
/etc/init.d/nginx restart
|
||||
```
|
||||
|
||||
To run Cloud Commander as daemon in linux you could set **log** to true in config and
|
||||
do something like this:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue