Operation and Maintenance
Linux Operation and Maintenance
How to configure the security settings of Nginx server through the Pagoda panel
How to configure the security settings of Nginx server through the Pagoda panel
With the popularity of the Internet, the number of websites has also increased. Due to cost and convenience considerations, many websites choose to use Nginx servers. But the security of Nginx server still needs us to continuously strengthen. As an excellent web server management tool, Pagoda Panel's security functions also provide great convenience to the majority of webmasters. Next, the author will introduce how to perform security settings on the Nginx server through the Pagoda panel.
1. Change the SSH default login port
SSH is a protocol used to remotely manage your services and file systems, and is often used for server security maintenance. In order to improve the security of the server, we should change the default login port of SSH to a non-common port. You can do this through the following steps:
- After logging in to the Pagoda panel, click "SSH" in the left navigation bar, find the "SSH Port" option and modify it. You can customize an unused port that is greater than 1024 and less than 65535. It is recommended not to use too conspicuous numbers.
- After the modification is completed, the modified port should be opened in the firewall in time, otherwise the SSH connection will not be successful. It can be operated through the "Firewall" in the Pagoda panel.
2. Set up the Nginx security module
The ngx_http_secure_link module that comes with the Nginx server provides a set of security algorithms to ensure the legitimacy of the HTTP request source. It can effectively prevent malicious requests or links from being accessed frequently, thereby increasing the load on the server. You can set it up through the following steps:
- After logging in to the Pagoda panel, click "Website" in the left navigation bar, find the "Nginx" option and enter.
- In the "Nginx" settings page, click the "Advanced Features" option and select "Advanced Configuration File" in the pop-up window.
- Add the following code to the advanced configuration file:
location /download/ {
secure_link $arg_sec_key,$arg_expires;
secure_link_md5 "$secure_link_expires$uri$remote_addr mysecretkey";
if ($secure_link = "") { return 403; }
if ($secure_link = "0") { return 410; }
}Among them, "mysecretkey" should be replaced with your own key.
- After the modification is completed, the Nginx server should be restarted to make the settings take effect. It can be operated in "Service Management" in the Pagoda Panel.
3. Turn on anti-hotlinking
Anti-hotlinking can prevent unauthorized sites from using your pictures and videos, thereby protecting your site content and traffic and reducing server pressure. You can set it up through the following steps:
- After logging in to the Pagoda panel, click "Website" in the left navigation bar, find the "Nginx" option and enter.
- In the "Nginx" settings page, click the "Advanced Features" option and select "Advanced Configuration File" in the pop-up window.
- Add the following code to the advanced configuration file:
location ~* .(gif|jpg|jpeg|png|flv|mp4|mp3|wmv|avi|ogg|swf)$ {
valid_referers none blocked *.example.com;
if ($invalid_referer) {
return 403;
}
}Among them, "example.com" should be replaced with your own site domain name.
- After the modification is completed, the Nginx server should be restarted to make the settings take effect. It can be operated in "Service Management" in the Pagoda Panel.
Summary:
It is essential to take some security measures, especially when your server carries important data or business applications, so it is recommended that you update the Nginx server Set for strict security. Through the simple operation of the pagoda panel, you can add a solid defense wall to the server.
The above is the detailed content of How to configure the security settings of Nginx server through the Pagoda panel. For more information, please follow other related articles on the PHP Chinese website!
Hot AI Tools
Undresser.AI Undress
AI-powered app for creating realistic nude photos
AI Clothes Remover
Online AI tool for removing clothes from photos.
Undress AI Tool
Undress images for free
Clothoff.io
AI clothes remover
AI Hentai Generator
Generate AI Hentai for free.
Hot Article
Hot Tools
Notepad++7.3.1
Easy-to-use and free code editor
SublimeText3 Chinese version
Chinese version, very easy to use
Zend Studio 13.0.1
Powerful PHP integrated development environment
Dreamweaver CS6
Visual web development tools
SublimeText3 Mac version
God-level code editing software (SublimeText3)
Hot Topics
1386
52
A brief analysis of the problem that the server cannot be remote after installing Pagoda
Nov 23, 2022 pm 04:56 PM
This article uses the Pagoda Panel Tutorial column to introduce to you the problem that server2022 cannot be remote after installing Pagoda. I wonder if you have encountered such a problem? Let me show you how I handle it!
How to set up security settings in 360 Extreme Browser
Jan 29, 2024 pm 09:51 PM
How should 360 Speed Browser perform security settings? When we use 360 Speed Browser, how should we perform security settings? Let’s introduce it below! We usually use 360 Speed Browser to browse the web. When we use it, we are worried that harmful websites will invade our browser, so we will make some security settings. So how to set them up specifically? The editor has compiled the 360 Speed Browser below. Detailed operation of security settings. If you don’t know how, follow me and read on! Detailed operations for security settings on 360 Speed Browser 1. Open 360 Speed Browser, find the icon with three horizontal lines in the upper right corner, and click to enter. 2. Enter the main settings menu, find the "Options" below, and click to enter. 3. After entering the "Options" interface, on the left
How to solve the 'Security settings change problem that prompts the pin code is no longer available after Win11 is turned on'
Jan 29, 2024 pm 02:27 PM
When we use win11 system, we will set the pin code to help our computer data. However, many users also show that the security settings on this device have been changed when setting the pin code, and the pin code is no longer available. So what should we do? manage? Users can go into the troubleshooter to make settings. Let this site give users a detailed introduction to what to do if Win11 starts up and it shows that the security settings on this device have been changed and the pin code is no longer available? Bar. What should I do if it shows that the security settings on this device have been changed and the pin code is no longer available when booting up Windows 11? First, on the page where your PIN is unavailable and you need to reset your PIN, hold down the shift key and select Restart. Please wait later will appear, and then enter the reset
How to set the speed limit of the virtual host through the Pagoda panel
Jun 21, 2023 am 11:17 AM
Pagoda Panel is a very excellent server management panel under Linux system. It has powerful functions and friendly interface, which can help users manage servers easily. In the process of using the Pagoda Panel, it is sometimes necessary to limit the speed of the virtual host to ensure the stability and fluency of the server. This article will introduce how to set the speed limit of the virtual host through the Pagoda panel to achieve a good user experience. 1. Overview of Speed Limit Speed limit refers to limiting the host bandwidth and ensuring the normal operation of the server by controlling the host traffic. exist
PHP file permission management and security settings
Aug 08, 2023 pm 02:51 PM
PHP file permissions are one of the important measures to protect file security on the server. Properly setting file permissions can prevent malicious users from modifying, deleting, or executing malicious code on files. Therefore, when developing and deploying PHP applications, file permissions must be correctly set and managed to ensure application security. 1. Basic concepts File permissions are divided into three levels, namely user (Owner), user group (Group) and other users (Other). Each level has three permissions, namely read (Re
What should I do if I get an error when deploying thinkphp5 in Pagoda?
Dec 19, 2022 am 11:04 AM
Solution to the error reported when deploying thinkphp5 in Pagoda: 1. Open the Pagoda server, install the php pathinfo extension and enable it; 2. Configure the ".access" file with the content "RewriteRule ^(.*)$ index.php?s=/$1 [QSA ,PT,L]”; 3. In website management, just enable thinkphp’s pseudo-static.
Security settings for Nginx access control list (ACL)
Jun 10, 2023 pm 09:55 PM
In today's Internet environment, security has become an important part of any system. Nginx is one of the most popular web servers currently, and its access control list (ACL) is an important tool for protecting website security. A well-set Nginx ACL can help you protect your server and website from attacks. This article will discuss how to set up Nginx access control lists to ensure the security of your website. What is Nginx Access Control List (ACL)? ACL(AccessCon
How to use the Pagoda panel to set up domain name resolution
Jun 21, 2023 am 09:19 AM
With the development and popularization of the Internet, domain names have become an indispensable part of our online world. However, many people are still confused about the settings of domain name resolution. Today, we will introduce how to use the Pagoda panel to set up domain name resolution. What is DNS? Domain name resolution is the process of binding a domain name to the IP address of the website or server it represents. It is a process that converts human-readable domain names into computer-readable IP addresses. The main components of domain name resolution are: domain name registration, DNS resolution and we


