


Basic tutorial on configuring the forum program Discuz under Linux Nginx MySQL, _PHP tutorial
Basic tutorial on configuring the forum program Discuz under Linux Nginx MySQL,
Crossday Discuz! Board (Discuz! for short) is a set of general tools launched by Beijing Kangsheng Xinchuang Technology Co., Ltd. Community forum software system. Since its launch in June 2001, Discuz! has more than 14 years of application history and more than 2 million website user cases. It is one of the most mature and coverage forum software systems in the world. The latest version, Discuz! X3.2, was officially released on June 9, 2015, introducing the application center development model for the first time. On August 23, 2010, Kangsheng Chuangxiang reached an acquisition agreement with Tencent and became a wholly-owned subsidiary of Tencent.
Crossday Discuz! Board (hereinafter referred to as Discuz!, Copyright Registration No. 2006SR11895 of the National Copyright Administration of China) is a universal community forum software system launched by Comsenz (Beijing) Technology Co., Ltd. (Comsenz in English). Users can Based on any programming required, through simple settings and installation, a forum service with complete functions, strong load capacity and highly customizable can be built on the Internet. Discuz!'s infrastructure is implemented using PHP MySQL, the world's most popular web programming combination. It is an efficient forum system solution that is well designed and suitable for various server environments.
As the largest community software and service provider in China, the Discuz! development team under Comsenz has rich experience in web application design, especially in forum products and related fields. After long-term innovative development, it has mastered a complete set of algorithms and data structures. to leading technologies in product safety. This makes Discuz! in the leading position among similar products at home and abroad in terms of stability, load capacity, safety and other aspects.
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.conf
user 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; #客户请求头缓冲大小 nginx默认会用client_header_buffer_size这个buffer来读取header值,如果header过大,它会使用large_client_header_buffers来读取如果设置过小HTTP头/Cookie过大 会报400 错误 nginx 400 bad request求行如果超过buffer,就会报HTTP 414错误(URI Too Long)nginx接受最长的HTTP头部大小必须比其中一个buffer大,否则就会报400的HTTP错误(Bad Request)。 client_max_body_size 8m; #最大上传附件8MB client_body_buffer_size 128k; #缓冲区代理缓冲用户端请求的最大字节数 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.conf upstream bbs.test.com { server 127.0.0.1; check interval=3000 rise=2 fall=5 timeout=1000 type=http; #interval检测间隔时间,单位为毫秒 #rsie请求2次正常的话,标记此realserver的状态为up #fall表示请求5次都失败的情况下,标记此realserver的状态为down #timeout为超时时间,单位为毫秒 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: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. Copy all the contents in the upload directory to the website document 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
Articles you may be interested in:
- Solution to the forgotten password of DISCUZ forum administrator
- DISCUZ forum UBB editor (added flexible calling, supports ASP UBB parsing) Package download
- DISCUZ paging code

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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



The solution to the Discuz background login problem is revealed. Specific code examples are needed. With the rapid development of the Internet, website construction has become more and more common, and Discuz, as a commonly used forum website building system, has been favored by many webmasters. However, precisely because of its powerful functions, sometimes we encounter some problems when using Discuz, such as background login problems. Today, we will reveal the solution to the Discuz background login problem and provide specific code examples. We hope to help those in need.

"Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

A must-have for Discuz users! Comprehensive analysis of renaming props! In the Discuz forum, the name change function has always received much attention and demand from users. For some users who need to change their name, name change props can easily modify the user name, and this is also an interesting way of interaction. Let’s take an in-depth look at the renaming props in Discuz, including how to obtain them, how to use them, and solutions to some common problems. 1. Obtain name-changing props in Discuz. Name-changing props are usually purchased through points or the administrator

"Exploring Discuz: Definition, Functions and Code Examples" With the rapid development of the Internet, community forums have become an important platform for people to obtain information and exchange opinions. Among the many community forum systems, Discuz, as a well-known open source forum software in China, is favored by the majority of website developers and administrators. So, what is Discuz? What functions does it have, and how can it help our website? This article will introduce Discuz in detail and attach specific code examples to help readers learn more about it.

What should I do if I encounter an incorrect Discuz password? Quick solution sharing! Discuz! It is a very popular forum program that provides users with a platform for convenient communication. Using Discuz! When accessing a forum, sometimes you may encounter an incorrect password, which may cause users to be unable to log in and use the forum normally. Well, meet Discuz! When the password is wrong, how should we quickly solve the problem? Some solutions will be shared below, with specific code examples provided for reference. 1. Check whether the password

Title: To solve the problem that Discuz WeChat shares cannot be displayed, specific code examples are needed. With the development of the mobile Internet, WeChat has become an indispensable part of people's daily lives. In website development, in order to improve user experience and expand website exposure, many websites will integrate WeChat sharing functions, allowing users to easily share website content to Moments or WeChat groups. However, sometimes when using open source forum systems such as Discuz, you will encounter the problem that WeChat shares cannot be displayed, which brings certain difficulties to the user experience.

Discuz Editor: A powerful web page editing tool that requires specific code examples. With the development of the Internet, website construction and content editing have become more and more important. As a common web page editing tool, Discuz editor plays an important role in website construction. It not only provides a wealth of functions and tools, but also helps users edit and publish content more conveniently. In this article, we will introduce the features and usage of the Discuz editor, and provide some specific code examples to help readers better understand and use

Title: Discuz background account login exception, how to deal with it? When you use the backend management of the Discuz forum system, you may sometimes encounter abnormal account login. This could be due to a variety of reasons, including a wrong password, account being blocked, network connection issues, etc. When encountering this situation, we need to solve the problem through simple troubleshooting and processing. Check whether the account number and password are correct: First, confirm whether the account number and password you entered are correct. When logging in, make sure the capitalization is correct and the password is
