In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to configure the online one-click generation artifact in Nginx". The explanation in the article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn how to configure the online one-click generation artifact in Nginx.
NGINX Config supports various configuration options such as HTTP, HTTPS, PHP, Python, Node.js, WordPress, Drupal, cache, reverse proxy, logging, and so on. Generate Web server Nginx configuration files online.
Operation and configuration is also very simple, you only need to do 2 steps:
Open the official website
Configure relevant parameters according to demand
A specific configuration file is automatically generated. Although the interface is in English, the functional page is very intuitive, resulting in a standard Nginx format.
The approximate interface after login is as follows:
Case presentation
Configure domain name: mingongge.com enables users to automatically jump to mingongge.com when they access the * .mingongge.com domain name, and enable http to force redirection to https configuration.
At this point, the configuration of Nginx will be automatically generated in real time as follows. I copy the generated configuration as follows:
/ etc/nginx/sites-available/mingongge.com.conf # filenames are all configured for you according to the rules server {listen 443 ssl http2; server_name mingongge.com; # SSL ssl_certificate / etc/letsencrypt/live/mingongge.com/fullchain.pem; ssl_certificate_key / etc/letsencrypt/live/mingongge.com/privkey.pem; ssl_trusted_certificate / etc/letsencrypt/live/mingongge.com/chain.pem; # security include nginxconfig.io/security.conf # additional config include nginxconfig.io/general.conf;} # subdomains redirect server {listen 443 ssl http2; server_name * .mingongge.com; # SSL ssl_certificate / etc/letsencrypt/live/mingongge.com/fullchain.pem; ssl_certificate_key / etc/letsencrypt/live/mingongge.com/privkey.pem; ssl_trusted_certificate / etc/letsencrypt/live/mingongge.com/chain.pem; return 301 https://mingongge.com$request_uri;} # HTTP redirect server {listen 80 Server_name .mingongge.com; include nginxconfig.io/letsencrypt.conf; location / {return 301 https://mingongge.com$request_uri;}}
Very convenient and fast.
The official also provides some basic optimized configuration of Nginx, as follows:
/ etc/nginx/nginx.conf # Generated by nginxconfig.io user www-data; pid / run/nginx.pid; worker_processes auto; worker_rlimit_nofile 65535; events {multi_accept on; worker_connections 65535;} http {charset utf-8; sendfile on; tcp_nopush on; tcp_nodelay on; server_tokens off; log_not_found off; types_hash_max_size 2048; client_max_body_size 16M; # MIME include mime.types Default_type application/octet-stream; # logging access_log / var/log/nginx/access.log; error_log / var/log/nginx/error.log warn; # load configs include / etc/nginx/conf.d/*.conf; include / etc/nginx/sites-enabled/*;}
There are also security-based configurations, as follows:
/ etc/nginx/nginxconfig.io/security.conf # security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "no-referrer-when-downgrade" always; add_header Content-Security-Policy "default-src * data: 'unsafe-eval'' unsafe-inline'" always; #. Files location ~ /\ (?! well-known) {deny all;}
All of them are equivalent to providing some basic template configuration, which can be modified according to their actual needs.
Thank you for your reading, the above is the content of "how to configure Nginx online one-click generation artifact". After the study of this article, I believe you have a deeper understanding of how to configure Nginx online one-click generation artifact, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.