This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
166
Apache / Re: My apache has stopped working
« on: May 22, 2023, 09:24:09 AM »
Please provide more info about the problem.
1. Have you done some changes (changed apache config, recompiled apache, etc) before the problem appeared ?
2. Are there some errors in:
3. Try to restart apachce and show us output of "journalctl -xe":
1. Have you done some changes (changed apache config, recompiled apache, etc) before the problem appeared ?
2. Are there some errors in:
Code: [Select]
/usr/local/apache/logs/error_log
3. Try to restart apachce and show us output of "journalctl -xe":
Code: [Select]
service httpd restart
journalctl -xe
167
PHP Selector / Re: php selector error 500
« on: May 21, 2023, 03:26:42 PM »
Look at this error:
In case you use Apache (PHP-FPM/suPHP) / Nginx+Apache (PHP-FPM/suPHP) then I recommend you do following:
(I suppose you have PHP 7.3 installed)
Code: [Select]
Handler "application/x-httpd-php74" not found
In case you use Apache (PHP-FPM/suPHP) / Nginx+Apache (PHP-FPM/suPHP) then I recommend you do following:
(I suppose you have PHP 7.3 installed)
Code: [Select]
grep "application/x-httpd-php73" /usr/local/apache/conf* -Rl
and then investigate the records associated with "application/x-httpd-php73" in the files listed by "grep". Check if the files have the similar records for "application/x-httpd-php74", add the necessary lines and restart apache/php-fpm.
168
DNS / Re: How to use 2 domains on one account?
« on: May 21, 2023, 10:52:57 AM »
If both domains www.example.com www.anotherdomain.com are pointed to the same folder but the domain name is changed in the address bar to www.example.com when you open www.anotherdomain.com then it could be caused by:
1. mod_rewrite redirects stored in .htaccess located in the home folder (document root) of the website
2. CMS used by you for your website www.example.com. It is common case for the websites built on Wordpress, Joomla, etc.
To investiate:
1. Create a test file (test.php):
and place it in the home folder (document root) of the website www.example.com.
2. Try to open the file test.php through the second domain name e.g:
http://www.anotherdomain.com/test.php
If the URL is changed to:
http://www.example.com/test.php
in the address bar of your browser then the problem is cased by the mod_rewrite rules stored in .htaccess
If the URL remains unchanged then the redirect from http://www.anotherdomain.com/test.php to http://www.example.com caused by the CMS your website is based on.
1. mod_rewrite redirects stored in .htaccess located in the home folder (document root) of the website
2. CMS used by you for your website www.example.com. It is common case for the websites built on Wordpress, Joomla, etc.
To investiate:
1. Create a test file (test.php):
Code: [Select]
<?php
echo "Hello World !";
?>
and place it in the home folder (document root) of the website www.example.com.
2. Try to open the file test.php through the second domain name e.g:
http://www.anotherdomain.com/test.php
If the URL is changed to:
http://www.example.com/test.php
in the address bar of your browser then the problem is cased by the mod_rewrite rules stored in .htaccess
If the URL remains unchanged then the redirect from http://www.anotherdomain.com/test.php to http://www.example.com caused by the CMS your website is based on.
169
CentOS Configuration / Re: cwp does not show websites on cgroups page?
« on: May 19, 2023, 07:24:10 PM »
The service could be disabled in autoboot. It could be case if the server was rebooted after the upgrade. So make sure the service is running.
170
PHP Selector / Re: cant install any php version
« on: May 19, 2023, 07:02:49 PM »
It seems the problem is associated with access permissions. Look at the error:
/usr/local/cwp/.conf/php_conf/php54.conf: line 1: ./configure: Permission denied
Most likely for PHP 5.4 it could be fixed by modifying the script /usr/local/cwp/.conf/php_conf/php54.conf
Just put the line:
as the first line of the script. (Similar to other php versions)
/usr/local/cwp/.conf/php_conf/php54.conf: line 1: ./configure: Permission denied
Most likely for PHP 5.4 it could be fixed by modifying the script /usr/local/cwp/.conf/php_conf/php54.conf
Just put the line:
Code: [Select]
chmod 755 ./configure
as the first line of the script. (Similar to other php versions)
171
CentOS 7 Problems / Re: Malware found
« on: May 19, 2023, 06:54:24 PM »
5 cents from me
Enable mod_security for all websites hosted on your VPS/server and check the owner of the suspicious files. It will inform you which account the hacked website is hosted in.
Don't forget to update CWP to the latest stable version.
Bad sign if the suspicious files belong to "root".
Enable mod_security for all websites hosted on your VPS/server and check the owner of the suspicious files. It will inform you which account the hacked website is hosted in.
Don't forget to update CWP to the latest stable version.
Bad sign if the suspicious files belong to "root".
172
E-Mail / Re: How to enable SSL/TLS and ports 995 and 465/587 for POP email
« on: May 16, 2023, 05:23:09 PM »
Hi,
1. Please detail what error message you get when you try to connect to the mailboxes using POPS.
2. Connect to your server using SSH as root and run the following command:
1. Please detail what error message you get when you try to connect to the mailboxes using POPS.
2. Connect to your server using SSH as root and run the following command:
Code: [Select]
netstat -tulpn | egrep "dovecot|/master"
and show us output.
173
Information / Re: Paython and CWP
« on: May 15, 2023, 09:12:02 AM »
connect to the database of CWP, usually called root_cwp and run the following SQL request/query:
You should get a list of CWP users and main domain names associated with their accounts.
In case the you get nothing then restore the database from backup.
Code: [Select]
select * from user;
You should get a list of CWP users and main domain names associated with their accounts.
In case the you get nothing then restore the database from backup.
174
Information / Re: Paython and CWP
« on: May 14, 2023, 12:04:50 PM »
So you can connect to the database from the command line. Then connect to the database of the CWP again and make sure it isn't empty:
you should see something like:
If your result is the same then the db looks good.
I checked this forum and found another thread with the similar errors. Please review the thread:
https://forum.centos-webpanel.com/informations/mysqli_error()/
Hope it will help you to solve the problem.
Also, in case you decide to reinstall MySQL/MariaDB, don't forget to make backups of your databases.
Code: [Select]
mysql -uDB_USER -pDB_PASS DB_NAME
show tables;
you should see something like:
Code: [Select]
MariaDB [root_cwp]> show tables;
+--------------------+
| Tables_in_root_cwp |
+--------------------+
| backups |
| domains |
| nameserver |
| notifications |
| packages |
| settings |
| subdomains |
| user |
+--------------------+
8 rows in set (0.000 sec)
If your result is the same then the db looks good.
I checked this forum and found another thread with the similar errors. Please review the thread:
https://forum.centos-webpanel.com/informations/mysqli_error()/
Hope it will help you to solve the problem.
Also, in case you decide to reinstall MySQL/MariaDB, don't forget to make backups of your databases.
175
CentOS 8 Problems / Re: How to fix roundcube mail server 403 forbidden error
« on: May 13, 2023, 09:44:59 PM »
I recommend you to following:
Go to the document root of Roundcube (webmail):
http://hostname.com/webmail/aa.php
if you get the error 403 again then most likely the problem is caused by wrong user/group, access permissions or .htaccess file.
Make sure the folder of roundcube belongs to
If the access permissions (ownger:group, etc) are correct then rename .htaccess to something like .htaccess_backup and try to access the file aa.php over the web again. In case it can be accessed then investigate your .htaccess.
Don't forget to remove the file aa.php when all test are finished.
Go to the document root of Roundcube (webmail):
Code: [Select]
cd /usr/local/cwpsrv/var/services/roundcube
create a simple php file:Code: [Select]
echo "<?php phpinfo(); ?>" > aa.php
chown cwpsvc.cwpsvc aa.php
then try to access it over the web (in your browser):http://hostname.com/webmail/aa.php
if you get the error 403 again then most likely the problem is caused by wrong user/group, access permissions or .htaccess file.
Make sure the folder of roundcube belongs to
Code: [Select]
cwpsvc:cwpsvc
All folders have access permissions 755 (rwx-rx-rx) and files 644 (-rw-r--r--) except config/config.inc.php 640 (rw-r-----)If the access permissions (ownger:group, etc) are correct then rename .htaccess to something like .htaccess_backup and try to access the file aa.php over the web again. In case it can be accessed then investigate your .htaccess.
Don't forget to remove the file aa.php when all test are finished.
176
Installation / Re: wordpress
« on: May 13, 2023, 06:23:05 PM »
What kind of webserver do you use (Nginx, Nginx+Apache, something else) ?
177
Information / Re: Paython and CWP
« on: May 13, 2023, 06:15:00 PM »
Try to connect to the database of CWP manually from terminal (SSH) using the command:
DB_USER, DB_PASS, DB_NAME you can get from the file:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
If you get something like:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
then try to reset the password using the script:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
/root/.my.cnf
restart CWP:
Code: [Select]
mysql -uDB_USER -pDB_PASS DB_NAME
DB_USER, DB_PASS, DB_NAME you can get from the file:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
If you get something like:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
then try to reset the password using the script:
Code: [Select]
/scripts/mysql_pwd_reset -q
then make sure the new password is listed in the files:/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
/root/.my.cnf
restart CWP:
Code: [Select]
service cwpsrv restart
and then try to access CWP from the web again.178
CWP API / Re: mysql user add help
« on: May 13, 2023, 04:17:23 PM »
As I understand you want to create a db_user, database and then add the created db_user to the database using API of CWP.
I looked at the CWP API, seems the action "add" of the API call "usermysql" creates the user and adds the db_user to the database because it has the param called "dbase" in description.
Let us know if it works
I looked at the CWP API, seems the action "add" of the API call "usermysql" creates the user and adds the db_user to the database because it has the param called "dbase" in description.
Let us know if it works
179
Apache / Re: PHP Processing in .htm & .html files
« on: May 12, 2023, 09:22:28 PM »
I am not 100% sure but I guess:
When you put:
into .htaccess your .htm, .html files are handled by suPHP. That is why you see
To solve this you need to customize the Apache template file (you wrote about .htaccess that is why I am sure you use Apache ).
The Apache php-fpm template files are located in the folder:
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/
Probably you need to change the lines:
inside the template files to something like:
then rebuild virtual hosts and restart Apache.
Sorry, I use a free version of CWP on my test box, so I don't use php-fpm there and can't be sure it is 100% working solution (make backups before you modify something ).
When you put:
Code: [Select]
AddHandler application/x-httpd-php81 .htm .html
into .htaccess your .htm, .html files are handled by suPHP. That is why you see
Code: [Select]
Server API: CGI/FastCGI
To solve this you need to customize the Apache template file (you wrote about .htaccess that is why I am sure you use Apache ).
The Apache php-fpm template files are located in the folder:
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/
Probably you need to change the lines:
Code: [Select]
<IfModule proxy_fcgi_module>
<FilesMatch \.php$>
SetHandler "proxy:%backend_fcgi%|fcgi://localhost"
</FilesMatch>
</IfModule>
inside the template files to something like:
Code: [Select]
<IfModule proxy_fcgi_module>
<FilesMatch \.php$|\.htm$|\.html$>
SetHandler "proxy:%backend_fcgi%|fcgi://localhost"
</FilesMatch>
</IfModule>
then rebuild virtual hosts and restart Apache.
Sorry, I use a free version of CWP on my test box, so I don't use php-fpm there and can't be sure it is 100% working solution (make backups before you modify something ).
180
Information / Re: So what's the verdict on AlmaLinux?
« on: May 12, 2023, 08:35:30 PM »
I created a VPS with Almalinux 8 a few days ago. Installed CWP (free), customized it according to my requirements (replaced suPHP by FastCGI/FCGI to enable multi PHP setup, installed rspamd, compiled custom kernel, etc, etc, etc) and it is going fine.
Currently I am investigating how to fix the problem with FFMpeg because the option offered by CWP causes error during the compilation.
However, it looks very promising for me (even a free version).
Currently I am investigating how to fix the problem with FFMpeg because the option offered by CWP causes error during the compilation.
However, it looks very promising for me (even a free version).