Under normal circumstances, when you newly install DirectAdmin, good VPS recommends not using the default CLI mode but choosing CGI mode. Especially when you encounter a high CPU load, the CGI mode can be seen as Which account is occupied? This is more convenient than CLI mode. In fact, I have always installed in CGI mode, but today I met a friend who wanted to convert the CLI to CGI. Baidu found those tutorials that were the same as copy and paste, so I had the urge to give it a try.
First, we edit the PHP mode in the custombuild options, set CLI to no and CGI to yes.

cd /usr/local/directadmin/custombuild ./build update ./build clean nano options.conf

Note that the highlighted part in the picture is the modified part.
da-cli-cgi-01
If nano runs and reports an error that it is not installed, please install it. You can also edit it with VI commands. Next, we recompile PHP.

./buildphpn

Remember to use screen, this step may take a long time.
The following are the problems encountered. The most common one is that the old account may report a 500 error. This is caused by permission issues. It is most likely caused by setting 777 in the CLI before, following the folder 755 and file 644. In principle, just modify the file permissions. If you encounter an error from squirrelmail or phpmyadmin, please also try to rebuild. I installed a new CLI for DA and then installed a WP and then converted and tried again. Currently, I encountered a permission problem and corrected it and it was OK. I am slowly exploring more problems that I may encounter. The one circulated on the Internet in 2010 The conversion methods introduced in 2018 may not be successful at all, so everyone should pay attention.


Hong Kong/United States/Domestic High Speed ​​VPS

postid
12880

Leave a Reply