Moonglade

Modern Markdown blogging with AI-powered localization and search.

Tag: Web


Web Application Development Checklist

This document comprehensively outlines the best practices framework for building highly available, secure, and efficient web services. At the security level, it emphasizes enabling modern encryption protocols such as TLS 1.3, HSTS, and OCSP Stapling, and strictly configuring CSP, Rate Limiting, and firewall rules to defend against XSS, DDoS, and brute-force attacks. In terms of network and system configuration, it recommends optimizing TCP congestion control algorithms, minimizing port exposure, disabling root password login, and reducing risks through SELinux and file permission controls. From an operations perspective, it is necessary to establish robust monitoring and alerting, snapshot backup, and automated scaling mechanisms to ensure rapid recovery of business continuity during failures or traffic spikes. In the DevOps workflow, static code analysis, unit testing, and containerized deployment should be integrated via CI/CD pipelines, leveraging Docker and Kubernetes for flexible scaling. The core of application development lies in eliminating underlying defects such as memory leaks, deadlocks, and SQL injection to ensure code quality. Additionally, attention must be paid to user experience, including responsive layout, multi-language and timezone support, and PWA compatibility, while strictly adhering to global and local compliance requirements such as GDPR and the Personal Information Protection Law, thereby achieving dual assurance of technical architecture and business value.

Views 545
Cloud Container Development Linux Server Service Web


Setup a Ubuntu apt mirror server

Ubuntu Mirror Why do this? I have many Ubuntu servers in my own data center at home. They need to update software packages every week. However, if every server connects to the Ubuntu official source, it will waste a lot of bandwidth. Therefore, I decided to set up an Ubuntu mirro...

Views 1,594
Cache Linux Mirror Server Ubuntu Web apt

Self-host an AI image generation system (based on Stable Diffusion) for your friends

This article introduces advanced usage tips for Stable Diffusion and secure deployment strategies. First, leveraging the PNG Info feature allows you to quickly view and reuse the specific parameters used during image generation; it is recommended to experiment with different combinations of Checkpoints and LoRAs to master stylistic patterns. Second, to address the security risks of exposing local services to the public internet, the article proposes a simplified yet secure UI configuration strategy: disabling VENV to reduce deployment complexity, installing xformers to optimize performance, and modifying startup parameters to hide sensitive directories. Core security measures include using config.json to disable dangerous tabs such as Settings and Train, utilizing ui-config.json to restrict batch generation, fix prompts, and hide the negative prompt input box, thereby preventing resource abuse and the generation of non-compliant content, while simultaneously using user.css to hide irrelevant buttons and simplify the interface. Finally, it is recommended to use FRPC in conjunction with a Caddy reverse proxy to securely expose the service to the public internet, enabling encrypted communication and automatic TLS certificate management, ensuring that friends can conveniently access your AI painting service while protecting privacy and data security.

Views 371
Ai Self hosting Server Stable Diffusion Tune Web

Install Nextcloud on an Ubuntu 20.04/22.04 server ★

This article details the complete deployment process for a Nextcloud server, from basic configuration to advanced optimization. First, it is necessary to modify `overwrite.cli.url` in `config.php` and set up Cron mode to automate background tasks. Second, it is recommended to install practical plugins such as two-factor authentication, task management, and notes. To expand storage capacity, create a new partition, format it, and mount a large-capacity hard drive, while ensuring that the data directory migration and permission settings are correctly configured. Additionally, the article covers region settings, preview feature optimization, and mail server configuration. It focuses on installing and configuring the Redis caching system, including APCu local caching and distributed lock settings, to resolve performance warnings and improve system efficiency. To prevent data loss, write an automated backup script to regularly sync the application directory, data files, and database to independent storage. Finally, a Caddy reverse proxy configuration solution is provided for specific needs, along with a guide for setting up a GPU acceleration environment if using the Recognize app, aiming to build a high-performance, secure, and easy-to-maintain private cloud environment.

Views 689
Apache2 Certbot IT Linux MySQL Nextcloud PHP Storage Ubuntu Web

Open Su Kang Ma in one second

This article introduces a method from 2021 for bypassing Alipay or WeChat mini-programs to directly access the web version of the Su Health Code via a browser, thereby accelerating the QR code scanning process. The author points out that daily use is inconvenient because mini-programs load slowly and rely on specific apps, whereas the Su Health Code is essentially a web application whose real URL can be obtained through packet capture. Users can access this official link on a PC to obtain a QR code containing a Token, then pin that URL to their phone’s home screen to achieve instant access to the health code, thus eliminating dependence on applications such as Alipay. The article also analyzes the legality of this method, confirming that it accesses the official website of the Suzhou Public Security Bureau and retrieves status through normal API interfaces, rather than storing data illegally; it also explains that the Token is time-sensitive and must be re-obtained after expiration. In addition, this method supports displaying the health code on a tablet or computer, which is useful in emergency situations such as a dead phone battery. Finally, the author reminds readers that this method may no longer be valid currently, and mentions that the Travel Card also has a web version, which can serve as a backup solution.

Views 2,302
Browser Access China Health Code Sukang Code Web Web Based Solution



How does WeChat implement distributed message distribution in its architecture? ★

This article provides an in-depth analysis of WeChat's seemingly counterintuitive feature designs, such as QR code login, lack of synchronization across multiple devices, and the inability to check whether a user has been blocked. It argues that these are not product experience flaws but rather inevitable outcomes of a distributed architecture. By observing the low-latency communication experienced by users in Australia, the author infers that WeChat employs globally distributed server nodes rather than centralized data centers. To achieve this, WeChat relies on three core algorithms: server selection, server-side switching, and user discovery. It also extensively utilizes the Gossip protocol to achieve decentralized state consistency and message routing. This architecture enables WeChat to scale flexibly like communication base stations, deploying resources where demand is highest, thereby significantly enhancing stability and operational efficiency under high concurrency while avoiding single points of failure. The article also explains mechanisms such as group chats and file transfer, drawing analogies to Email protocols to reveal WeChat's essence as a global communication infrastructure. Finally, the author urges product managers to understand the complexity of underlying architectures, avoid blind imitation or underestimating technical constraints, because simple-looking features often conceal sophisticated system design logic.

Views 3,653
Distributed Distributed Systems IM Messging WeChat Web