Fix unable to upload large files to Nextcloud
Uploading large files to my Nextcloud instance would always showing 504 Gateway Timeout, similar issues can be found on Nextcloud forum. From NGINX documentation, we can see that the default gateway timeout time is 60 seconds, which is not sufficient for Nextcloud to move the file. Therefore, by setting the proxy_read_timeout to a higher value, the problem can be solved....
Adding Vue components dynamically
Let's say we have a component called Table in Vue.js. We want it to be added to the body only after clicking a button. We can use <component> to achieve this:
// script
data(){
return {
dynamicComponent: null,
}
}
// template
<component :is="dynamicComponent" :mydata="mydata" />
where dynamicComponent is the dynamic component object. When we want to add the component, we can simply assign dynamicComponent with the object:
this.dynamicComponent = Table;
If w...
SSDP 攻擊記錄
背景
機緣巧合地當了某遊戲伺服器的技術人員,可是由開服的那天就一直出現突然吃滿網路和CPU的問題。三個月來一直在找出問題,直到今天終於找出問題的根源。
徵狀
玩家會看到PL值(packet loss rate)一直上升,然後斷線。同時遠端桌面也會很卡,也有可能斷線。因為主機是撥號連線來使用固定IP位址,所以整個內網都會一起卡。主機會看到伺服器程序吃滿網路和CPU。
最�...
Responsive Text Size on HTML
I am currently working on a project which requires viewing the page with mobile device, obviously the font size isn't large enough for mobile devices.
I had searched for many methods for this problem, but none of them did a good job. Until I found this solution on StackOverflow:
<meta name="viewport" content="width=device-width, initial-scale=1">
Source: Bootstrap responsive typography for desktop and mobile
...
Exposing Nextcloud to public with nginx reverse proxy and SSL enabled
BackgroundAfter deploying this site, I decided to host a Nextcloud such that I can own a private cloud with large capacity. Nextcloud would be an ideal choice since it has Collabora for editing documents. Who would use Google Drive with only 15GB when we can have unlimited storage space by hosting our own server? Software usednginxNextcloudDockerDeploymentFirst of all, we need Docker containers. Grab a Nextcloud container with "docker pull nextcloud:latest", or grab a favored image. And set...