Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure Discuz under Linux+Nginx+MySQL

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article focuses on "how to configure Discuz under Linux+Nginx+MySQL". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to configure Discuz under Linux+Nginx+MySQL.

Crossday Discuz! Board (abbreviated as Discuz!) is a general community forum software system launched by Beijing Kangsheng New Technology Co., Ltd. Since its launch in June 2001, Discuz! With more than 14 years of application history and more than 2 million website user cases, it is one of the forum software systems with the highest maturity and coverage in the world. The latest version of Discuz! The official version of X3.2 was released on June 9, 2015, introducing Tencent App Center's development model for the first time. On August 23, 2010, Kangsheng wanted to reach an acquisition agreement with Tencent and become a wholly owned subsidiary of Tencent.

Crossday Discuz! Board (hereinafter referred to as 2006SR11895, copyright Registration number of China National copyright Administration) is a set of general community forum software system launched by Kangsheng Creative (Beijing) Technology Co., Ltd. (English referred to as Comsenz). Users can build a forum service with perfect function, strong load capacity and highly customizable forum service on the Internet without any programming and through simple setup and installation. Discuz! The infrastructure is implemented by PHP+MySQL, the most popular web programming combination in the world. It is a well-designed and efficient forum system solution suitable for a variety of server environments.

As the largest community software and service provider in China, Discuz under Comsenz! The development team has rich experience in web application design, especially in forum products and related fields. After long-term innovative development, the development team has mastered a set of leading technologies from algorithms, data structures to product security. Make Discuz! It is in the leading position of similar products at home and abroad in terms of stability, load capacity, security and so on.

Let's take a look at the Discuz installation and configuration process in the LNMP environment:

1. Configure nginx

Vim / usr/local/nginx/etc/nginx.confuser nginx; worker_processes 1; # error_log logs/error.log; # error_log logs/error.log notice; error_log logs/error.log info;events {worker_connections 1024;} http {include mime.types; server_tokens off; default_type application/octet-stream Log_format main'$remote_addr-$remote_user [$time_local] "$request"'$status $body_bytes_sent "$http_referer"'"$http_user_agent"$http_x_forwarded_for"; access_log logs/access.log main; sendfile on; keepalive_timeout 65; client_header_buffer_size 32k; large_client_header_buffers 4 32k # customer request header buffer size nginx uses client_header_buffer_size buffer to read header value by default. If header is too large, it will use large_client_header_buffers to read if set too small HTTP header / Cookie too large, it will report 400 error nginx 400 bad request request line if it exceeds buffer, it will report HTTP 414 error (URI Too Long) nginx accepts that the longest HTTP header size must be larger than one of buffer, otherwise it will report 400 HTTP error (Bad Request). Client_max_body_size 8m; # maximum upload attachment 8MB client_body_buffer_size 128k; # buffer proxy buffer maximum number of bytes requested by the client keepalive_timeout 60; tcp_nopush on; tcp_nodelay on; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; include vh/bbs.yourich.com.cn.conf } mkdir / usr/local/nginx/etc/vh vim / usr/local/nginx/etc/vh/discuz.confupstream bbs.test.com {server 127.0.0.1; check interval=3000 rise=2 fall=5 timeout=1000 type=http # interval detection interval in milliseconds # if 2 rsie requests are normal, marking the status of this realserver as up # fall means that all 5 requests have failed, marking the status of this realserver as down # timeout is the timeout, in milliseconds check_http_send "GET / HTTP/1.1\ r\ nHOST:\ r\ n\ r\ n"; check_http_expect_alive http_2xx http_3xx http_4xx } server {listen 80; server_name bbs.test.com; index index.html index.php; root / www/discuz; access_log logs/bbs_access.log main; error_log logs/bbs_error.log; location ~. *\. (jpg | jpeg | png | gif\ js | css) ${root / www/discuz; access_log off;} location / {try_files $uri $uri/ / index.php?$args;} location ~. *\. (php)? ${expires-1s Fastcgi_pass 127.0.0.1 uri 9000; fastcgi_index index.php; try_files $uri = 404; include fastcgi_params; fastcgi_param SCRIPT_FILENAME / www/discuz$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length;}}

2. Download discuz

Download the discuz installation package and unzip it and copy all the contents in the upload directory to the website documents and directory specified by nginx / www/discuz

Set permissions

Chown-R nginx:nginx / www/discuz

3. Create data

Create database discuz default character set utf8; grant all privileges on discuz.* to discuz@'localhost' identified by 'discuz'; flush privileges

4. Install discuz

Enter http://ip/install in the browser to install according to the wizard

At this point, I believe you have a deeper understanding of "how to configure Discuz under Linux+Nginx+MySQL". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report