After we have installed the website service management system wdcp, we may have questions like this or that during use. Below are some points for you to learn. If you do not know anything, go to the wdlinux forum to find related tutorials.
1, In the installation or use of wdcpAfter,Use yumUpdated question
After wdcp is installed or wdcp is used normally, if you intentionally or unintentionally use yum to update the system or install software, apache in the yum source is sometimes directly updated and installed, at this time, the problem is that all the websites or pages are opened with prompts.
Apache welcome page
This is because yum has installed apache in the yum source and replaced the apache STARTUP script. As a result, apache started and started by default is updated and installed by the yum source instead of apache in wdcp, so there will be this problem
So how can we solve this problem?
Easy to use
Ln-sf/www/wdlinux/init. d/httpd/etc/rc. d/init. d/httpd
Reboot
In this way, you can restart the instance.
2, Apache, NGINXSupports Chinese URLsUltimate Solution for images and file names
Apache(32Bit ):
Installation environment: CentOS 5.6 + Apache 2.2.15
Installation Result: After installation, the link "Chinese image and file name" can be opened directly.
The installation process is as follows:
1. Download the installation package
- Wget ftp://ftp.aconus.com/fc5/mod_encoding/mod_encoding-2.2.0-1.i386.tar.gz
Copy code
2. decompress the package directly.
- Tar zxvf mod_encoding-2.2.0-1.i386.tar.gz
Copy code
Install the two rpm installation packages
- Rpm-ivh iconv_hook-1.0.0-1.i386.rpm
- Rpm-ivh mod_encoding-2.2.0-1.i386.rpm
Copy code
3. Use find/-name httpd. conf to find the apache configuration file httpd. conf. Add the following content to the vi Editor:
- LoadModule encoding_module modules/mod_encoding.so
- Header add MS-Author-Via "DAV"
- EncodingEngine on
- NormalizeUsername on
- SetServerEncoding GBK
- DefaultClientEncoding UTF-8 GBK GB2312
- AddClientEncoding "(Microsoft. * DAV $)" UTF-8 GBK GB2312
- AddClientEncoding "Microsoft. * DAV" UTF-8 GBK GB2312
- AddClientEncoding "Microsoft-WebDAV *" UTF-8 GBK GB2312
Copy code
Save and exit
4. Restart apache
- Service httpd restart
Copy code
5. Complete!
NOTE: If WDCP is installed, restart apache will fail, you need to copy mod_encoding.so to/www/wdlinux/httpd-2.2.22/modules,
Command:
- Cp/usr/lib/httpd/modules/mod_encoding.so/www/wdlinux/httpd-2.2.22/modules
Copy code
Apache
(
64
Bit ):
---------------------
This solution is used to solve Apache Software's support for Chinese URLs, Chinese images, and file names.
Test environment: 64-bit CentOS5.5 + Apache2.2.15
---------------------
Download mod_encoding_64.tar.gz
The source code package is compiled by Wu Shichang and contains the Patches required by apache2.2.
2011.9.20 is supplemented by the Captain modification of Hostloc.com.
---------------------
1. Install the gcc component
- Yum install gcc-y
Copy code
2. Download the compressed package
- Wget http://d.nicwind.com/files/mod_encoding_64.tar.gz
Copy code
3. decompress and compile the compressed package
- Tar zxvf mod_encoding_64.tar.gz
- Cd mod_encoding_64
- Patch-p0 & lt; mod_encoding.c-apache2.2-20060520.patch
- Cd lib
- Chmod 755 configure
- ./Configure -- prefix =/usr
- Make & amp; make install
- Ldconfig
- Cd ../
- Chmod 755 configure
- Cp-p/usr/sbin/apxs/usr/bin
- ./Configure -- with-apxs =/usr/bin/apxs -- with-iconv-hook =/usr/include
- Make
- Gcc-shared-o mod_encoding.so mod_encoding.o-Wc,-Wall-Llib-liconv_hook
- Cp mod_encoding.so/usr/lib/httpd/modules
Copy code
Note:/usr/lib/httpd/modules is the modules directory of apache. You can use
- Find/-name modules
Copy code
Find the directory path
Change/usr/lib/httpd/modules to the storage path of your apache module.
4. After completing the preceding operations, modify the apache configuration file (you can use find/-name httpd. conf to find httpd. conf file path), add the following content to the apache configuration file httpd. conf.
- LoadModule encoding_module modules/mod_encoding.so
-
- EncodingEngine on
- NormalizeUsername on
- SetServerEncoding GBK
- DefaultClientEncoding UTF-8 GBK GB2312
- AddClientEncoding "(Microsoft. * DAV $)" UTF-8 GBK GB2312
- AddClientEncoding "Microsoft. * DAV" UTF-8 GBK GB2312
- AddClientEncoding "Microsoft-WebDAV *" UTF-8 GBK GB2312
Copy code
Save and exit
5. Restart apache
- Service httpd restart
Copy code
6. Complete
NOTE: If WDCP is installed, restart apache will fail, you need to copy mod_encoding.so to/www/wdlinux/httpd-2.2.22/modules,
Command:
- Cp/usr/lib/httpd/modules/mod_encoding.so/www/wdlinux/httpd-2.2.22/modules
Copy code
Nginx
:
1. Check whether your Linux system is UTF encoded. log on to SSH as the Root user:
- Env | grep LANG
- LANG = en_US.UTF-8
Copy code
2. Set the default encoding in the NGINX configuration file to UTF-8.
- Server
- {
- Listen 80;
- Server_name xxxx.com;
- Index index.html index.htm index. php;
- Root/usr/local/nginx/html/inginx.com;
- Charset UTF-8;
- }
Copy code
3. If putty is used
Windows> translation> UTF-8
Mkdir Chinese directory name
Echo 'Chinese directory name'> Chinese directory name/Chinese .html
4. If you are using securecrt to upload files, please choose to go back-> appearance-UTF-8
Default encoding is also set to TUF-8 for FTP software
5. If the uploaded file name is garbled
Run
- For f in 'ls *. html '; do mv $ F' ls $ f | iconv-f GBK-t UTF-8'; done
Copy code
Complete.
3
, Wdcp
Set and process site access logs
Wdcp starts from Version 2.2 and supports web Log cutting, saving by day, compressing and packaging, and setting retention and days
Specific settings are as follows:
System settings are shown in figure
In this way, you can automatically cut, compress, and retain the last 7 days.
Note
Here is the general switch settings. Specifically, the log function must be enabled on the site to be effective. If site logs are not enabled, the settings here are ineffective.
At the same time, there is a default log record in the system. If site logs are not enabled, they will be recorded in the default log file. The directory is
/Www/wdlinux/nginx/logs/
/Www/wdlinux/apache/logs/
This document is taken from the wdlinux Forum. For more information, see!