Jump to content

nginx and orange pi is useful for money saviing server ( only 5-10W)


hatahata

Recommended Posts

Hi all.

 

i say  goodby rental server , hello orange pi .

 

by the way i run nginx as basic authentification .

 

/etc/nginx/nginx.conf is

-------------------------------

events {
    worker_connections  800;
       }
http {
    include       mime.types;
    default_type  application/octet-stream;
    index         index.html index.htm;
    keepalive_timeout  65;
    server_tokens off;
server {
        listen       80;
        server_name  localhost;    #<-for test
        root         /var/www/d1;
          }
server {
        listen       80;
        server_name  n------------a.dip.jp;
        root         /var/www/d0;
          }
server {
        listen       80;
        server_name  s-------------y.mydns.jp;
        root         /var/www/d1;
    auth_basic           "closed site";
    auth_basic_user_file /var/www/1/.htpasswd;
          }
    }


n------------a.dip.jp          is freely accessed.

s-------------y.mydns.jp   is protected by id and password .
 

 

and

whe we use nand ,

                      http://forum.armbian.com/index.php/topic/977-usrlibnand-sata-installnand-sata-installsh/?hl=nand

we get big root (in may case 250GB USB HDD) , so we do not need rental server .

nand.jpg

 

df
Filesystem     1K-blocks         Used             Available       Use% Mounted on
/dev/root      234171444     20189084   202087056  10%   /
devtmpfs          381396        0    381396   0% /dev
tmpfs             512624        0    512624   0% /dev/shm
tmpfs             512624     7192    505432   2% /run
tmpfs               5120        4      5116   1% /run/lock
tmpfs             512624        0    512624   0% /sys/fs/cgroup
/dev/mmcblk0p1   2275348    79604   2080172   4% /boot
tmpfs             262144        8    262136   1% /tmp
tmpfs             102528        0    102528   0% /run/user/1000

 

orange pi PC consumes 5W or so , i stop rental server and use orange pi PC as internet server ( www , sshd  etc) .

perhaps money saving comes (my rental server was 1GB memory  100GB harddisk).

 

 

and cloneing USB-HDD to USB-HDD is (this is important for server's backup )

 

after  mount /dev/sdb1 /mb1

 

clone-rsync-HDD2HDD.bat

-------------------------------
df
fdisk -l /dev/sda
fdisk -l /dev/sdb

echo ' push a key '
read X
echo $x
cd /mb1
 mkdir -p bin etc home lib opt root sbin srv usr var selinux boot
for x in /bin /etc /home /lib /opt /root  /sbin /srv /usr /var /selinux /boot  
do
rsync -avHx  --delete $x/  /mb1$x/
done
cd /mb1
mkdir -p  dev proc sys media mnt run tmp

 

 

---------

 

regards

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines