Posts


May. 23, 2017

2017.5.23 HTTPS改造手记

前几天闲的无聊,就将博客升级为HTTPS连接。说得简单,其实也没少烦心。因为从一开始我就没打算用HTTPS,毕竟HTTPS对服务器资源的消耗不容小觑,而且对访问速度也有一定影响。之前有所尝试,曾经直接在CDN的基础上启用HTTPS访问,但是因为静态文件绝对URL的缘故,多次尝试后未能成功。后来干脆放弃了全站CDN,仅将静态文件托管至CDN,这样一来就相对灵活了。

More...

May. 19, 2017

野性的呼唤:第一章·The Call of the Wild:Chapter1(Jack London 杰克·伦敦)英汉双语

The Call of the Wild

by Jack London

Old longings nomadic leap, Chafing at custom's chain; Again from its brumal sleep Wakens the ferine strain.

Buck did not read the newspapers, or he would have known that trouble was brewing, not alone for himself, but for every tidewater dog, strong of muscle and with warm, long hair, from Puget Sound to San Diego. Because men, groping in the Arctic darkness, had found a yellow metal, and because steamship and transportation companies were booming the find, thousands of men were rushing into the Northland. These men wanted dogs, and the dogs they wanted were heavy dogs, with strong muscles by which to toil, and furry coats to protect them from the frost.

Buck lived at a big house in the sun-kissed Santa Clara Valley. Judge Miller’s place, it was called. It stood back from the road, half-hidden among the trees, through which glimpses could be caught of the wide cool veranda that ran around its four sides. The house was approached by graveled driveways which wound about through wide-spreading lawns and under the interlacing boughs of tall poplars. At the rear things were on even a more spacious scale than at the front. There were great stables, where a dozen grooms and boys held forth, rows of vine-clad servants’ cottages, an endless and orderly array of outhouses, long grape arbors, green pastures, orchards, and berry patches. Then there was the pumping plant for the artesian well, and the big cement tank where Judge Miler’s boys took their morning plunge and kept cool in the hot afternoon.

More...

May. 14, 2017

体验在NAS4Free中安装ownCloud全过程

NAS4Free

安装NAS4Free到VMware Workstation

sourceforge.net下载NAS4Free的ISO镜像文件

下载到电脑中之后,打开VMware Workstation,选择添加虚拟机⇒典型⇒下一步,选择“安装程序光盘映像文件(iso)”,点击“浏览”找到下载好的镜像。

More...

May. 11, 2017

枭河桥记事/鹰河桥事件·An Occurrence at Owl Creek Bridge(Ambrose Bierce 安布罗斯·比尔斯)英汉双语

An Occurrence at Owl Creek Bridge

by Ambrose Bierce

Set during the American Civil War, "An Occurrence at Owl Creek" is Bierce's most famous short story. It was first published in the San Francisco Examiner in 1890. It then appeared in Bierce's 1891 collection "Tales of Soldiers and Civilians."


 I

An Occurrence at Owl Creek Bridge pendulum with escapementA man stood upon a railroad bridge in northern Alabama, looking down into the swift water twenty feet below. The man's hands were behind his back, the wrists bound with a cord. A rope closely encircled his neck. It was attached to a stout cross-timber above his head and the slack fell to the level of his knees. Some loose boards laid upon the sleepers supporting the metals of the railway supplied a footing for him and his executioners--two private soldiers of the Federal army, directed by a sergeant who in civil life may have been a deputy sheriff. At a short remove upon the same temporary platform was an officer in the uniform of his rank, armed. He was a captain. A sentinel at each end of the bridge stood with his rifle in the position known as "support," that is to say, vertical in front of the left shoulder, the hammer resting on the forearm thrown straight across the chest--a formal and unnatural position, enforcing an erect carriage of the body. It did not appear to be the duty of these two men to know what was occurring at the center of the bridge; they merely blockaded the two ends of the foot planking that traversed it. Beyond one of the sentinels nobody was in sight; the railroad ran straight away into a forest for a hundred yards, then, curving, was lost to view. Doubtless there was an outpost farther along. The other bank of the stream was open ground--a gentle acclivity topped with a stockade of vertical tree trunks, loopholed for rifles, with a single embrasure through which protruded the muzzle of a brass cannon commanding the bridge. Midway of the slope between the bridge and fort were the spectators--a single company of infantry in line, at "parade rest," the butts of the rifles on the ground, the barrels inclining slightly backward against the right shoulder, the hands crossed upon the stock. A lieutenant stood at the right of the line, the point of his sword upon the ground, his left hand resting upon his right. Excepting the group of four at the center of the bridge, not a man moved. The company faced the bridge, staring stonily, motionless. The sentinels, facing the banks of the stream, might have been statues to adorn the bridge. The captain stood with folded arms, silent, observing the work of his subordinates, but making no sign. Death is a dignitary who when he comes announced is to be received with formal manifestations of respect, even by those most familiar with him. In the code of military etiquette silence and fixity are forms of deference.

The man who was engaged in being hanged was apparently about thirty-five years of age. He was a civilian, if one might judge from his habit, which was that of a planter. His features were good–a straight nose, firm mouth, broad forehead, from which his long, dark hair was combed straight back, falling behind his ears to the collar of his well-fitting frock coat. He wore a mustache and pointed beard, but no whiskers; his eyes were large and dark gray, and had a kindly expression which one would hardly have expected in one whose neck was in the hemp. Evidently this was no vulgar assassin. The liberal military code makes provision for hanging many kinds of persons, and gentlemen are not excluded.

More...

May. 7, 2017

Nextcloud/ownCloud去除URL中的index.php详解

Nextcloud/ownCloud在URL中默认是显示入口文件index.php的:

去除URL中的入口文件有这样3点好处:

[ssbluelist]

  • 拥有一个美观的URL
  • 防止入口文件被篡改,保护网站安全
  • 提高逼格
[/ssbluelist]

启用Rewrite

在Ubuntu/Debian中:
a2enmod rewrite #激活mod_rewrite

service apache2 restart #重启apache

在CentOS/RedHat中,需要手动在虚拟主机配置文件中添加以下内容:

More...

May. 1, 2017

Nextcloud+Collabora Office文档在线协作

本文演示在VPS上配置Nextcloud+CollaboraOffice实现文档在线预览

视频教程

[tabgroup][tab title="bilibili" id="1"] [/tab][tab title="腾讯视频" id="2"][/tab][tab title="优酷视频" id="3"][/tab] [/tabgroup]

简介

这个Office文档在线预览功能是基于Nextcloud Collabora Online插件和在Docker上跑的Collabora Office。

通过Apache反向代理将Collabora Office代理至443端口,供Nextcloud通过HTTPS访问。

More...

Apr. 30, 2017

生火·To Build a Fire(Jack London 杰克·伦敦)英汉双语

To Build a Fire

by Jack London

Day had broken cold and grey, exceedingly cold and grey, when the man turned aside from the main Yukon trail and climbed the high earth- bank, where a dim and little-travelled trail led eastward through the fat spruce timberland. It was a steep bank, and he paused for breath at the top, excusing the act to himself by looking at his watch. It was nine o’clock. There was no sun nor hint of sun, though there was not a cloud in the sky. It was a clear day, and yet there seemed an intangible pall over the face of things, a subtle gloom that made the day dark, and that was due to the absence of sun. This fact did not worry the man. He was used to the lack of sun. It had been days since he had seen the sun, and he knew that a few more days must pass before that cheerful orb, due south, would just peep above the sky- line and dip immediately from view.

More...

Apr. 29, 2017

Nextcloud漂亮易用的WebMail插件:RainLopp

RainLoop是一款漂亮易用的WebMail插件,可以让你在Nextcloud中管理自己的邮件。支持中文,可以自行添加自己的邮箱服务器,拥有多种主题和插件。

使用方法

到插件页面激活该插件:

More...

Apr. 22, 2017

NC安全检测工具:Nextcloud Private Cloud Security Scanner

数据安全是个大问题。去年,Dropbox的6800万个账户丢失了数据,雅虎有不少于10亿的帐户受损。Nextcloud提供了一个在线的Nextcloud安全性检测工具,它可以自动访问你的Nextcloud实例、分析安全状况。
Nextcloud Private Cloud Security Scanner会检查以下项目: [ssyellowlist]
  • 程序漏洞
  • 安全强化状况
  • 服务器安全
[/ssyellowlist]

[warningbox]Nextcloud Private Cloud Security Scanner仅仅能从外部对服务器进行检查而无法触及到内部漏洞[/warningbox]

More...

Apr. 15, 2017

VPS快速完美部署ownCloud/Nextcloud全过程(2)

传送门:VPS快速完美部署ownCloud/Nextcloud全过程(1)

配置HTTPS

申请SSL证书

首先我们需要一个SSL证书,并且不建议使用自签名证书。

证书有收费的也有免费的,收费的一般比较昂贵,像我这样自己玩玩用免费的就够了。

我是在阿里云上申请的免费证书,当然,像腾讯云这样的也提供免费证书。

More...