Show Posts

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.


Messages - cyberspace

Pages: [1]
1
Nginx / Re: Disable nginx for specific users
« on: October 08, 2021, 04:09:30 PM »
I do believe you selected the webserver configuration "Nginx & Apache" from the webserver solutions offered by CWP.

In this case NGINX can't be removed/disabled for some specific users completely because the option "Nginx & Apache" configures NGINX as reverse proxy. It means NGINX listens the ports 80 (http), 443 (https) and gets all HTTP/HTTPS requests. In case the request can't be handled by Nginx it goes to Apache.

In your case you can create some "dummy" nginx template for Nginx. It should just accept the HTTP/HTTPS requests and pass the requyests to Apache without any doubts. Then use "WebServers Domain Conf" to enable the created template for the specific domain/user.

Let us know if you need further assistance.

2
Addons / Re: how to remove/hide Site.pro Website Builder menu
« on: September 30, 2021, 09:21:39 AM »
Hi,

Now sure if you need help still. Anyway here is how you can remove the icon and link about SitePro from the dashboard:

1. Log into your server over SSH as root
2. Open the file /usr/local/cwpsrv/var/services/users/cwp_theme/original/mod_dashboard.html using your favorite text editor. I like "vi":
Code: [Select]
vi /usr/local/cwpsrv/var/services/users/cwp_theme/original/mod_dashboard.html3. Find the line:
Code: [Select]
<div class="col-md-3 dashboard-item"><a href="?module=siteprobuilder"><img src="{{url}}/img/pencil-ruler-solid2.png" class="blue" width="40" style="margin-right: 10px;margin-top: 10px"> <span>Site.pro Website Builder</span></a></div>and change it to:

Code: [Select]
<div class="col-md-3 dashboard-item">{% if ("sitepad" in rmenu ) %}<a href="?module=siteprobuilder"><img src="{{url}}/img/pencil-ruler-solid2.png" class="blue" width="40" style="margin-right: 10px;margin-top: 10px"> <span>Site.pro Website Builder</span></a>{% endif %}</div>
or remove the line.

However, I assume the custom changes will be removed once the theme is updated. So most likely it is better to copy the original theme to some custom folder and make the necessary changes.

More about themes you can find here:
https://docs.control-webpanel.com/docs/developer-tools/theme-construction/user

3
CWP API / Re: What is core.xxx in API
« on: September 07, 2021, 07:57:19 AM »
The core files are dump files created by the system when scripts crash.  The core dump files are used to investigate why the scripts finished abnormally. It is safe to remove the core.xxx files.

More about core dump files you can find here:
https://wiki.archlinux.org/title/Core_dump

4
CWP API / Re: CWP api admindomains add subdomain
« on: September 06, 2021, 06:05:59 PM »
Did you modify the apache/nginx templates using the control panel or manually over SSH ?

More about the webtemplates you can find here:
http://wiki.centos-webpanel.com/webservers-vhost-templates

Just make sure sure the directive DocumentRoot inside the apache templates looks like:

Code: [Select]
DocumentRoot %docroot%
for Nginx root:

Code: [Select]
root %docroot%;

5
CentOS-WebPanel Bugs / Re: User cannot login (URGENT)
« on: April 30, 2021, 11:02:24 AM »
The problem described by appears from time to time. Did you try to clean cache and cookies of your browser or log into CWP using another browser ?

In case the above solution doesn't work for you, let us know if the problem associated with some specific or all users.

6
PHP Selector / Re: php 7.4 compile fails due to libzip
« on: April 30, 2021, 10:22:26 AM »
Hi,

PHP 7.4. is used as the primary PHP version on my server with CWP (free version) and

Code: [Select]
rpm -qa| grep zip
shows the following "zip" related packages:

Code: [Select]
unzip-6.0-21.el7.x86_64
gzip-1.5-10.el7.x86_64
bzip2-devel-1.0.6-13.el7.x86_64
p7zip-plugins-16.02-10.el7.x86_64
bzip2-1.0.6-13.el7.x86_64
perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64
libzip5-1.6.1-1.el7.x86_64
bzip2-libs-1.0.6-13.el7.x86_64
zip-3.0-11.el7.x86_64
p7zip-16.02-10.el7.x86_64

So I recommend you to check if the above (most likely libzip5) packages are installed on your system.

Pleasen note, I compiled PHP 7.4 using "PHP Version Switcher v2" and the following configuration settings were used:

Code: [Select]
./configure  --with-config-file-path=/usr/local/php --enable-cgi --with-config-file-scan-dir=/usr/local/php/php.d --with-zlib=/usr --enable-mbstring --with-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-curl --with-iconv --with-gmp --with-pspell --enable-gd --with-jpeg --with-freetype --enable-gd-jis-conv --with-webp --with-zlib-dir=/usr --with-xpm --with-openssl --with-pdo-mysql=mysqlnd --with-gettext=/usr --with-bz2=/usr --with-mysqli --enable-soap --enable-phar --with-xsl --with-xmlrpc --with-kerberos --enable-posix --enable-sockets --with-external-pcre --with-libdir=lib64 --with-mysql-sock=/var/lib/mysql/mysql.sock --enable-intl --enable-litespeed PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig

So compare the compilation setting used by the PHP selector and PHP Version Switcher v2. Hope it will help you to investigate and solve the problem quickly.

My server works under `CentOS Linux release 7.9.2009`.

7
I had the similar problem.

Actually I was unable to log into CWP using the latest Firefox. I tried to clean cache, etc but nothing helped. At the same time , the browsers Chrome, Brave worked well. So I just suggest you to install another browser and check if the problem remains.

8
Information / Re: Disappointed with CWP 🤬
« on: April 19, 2021, 08:18:37 PM »
I don't use CWP for many projects but the panel looks good for me and satisfies my expectations. Yes, some functions didn't work but when I checked the logs I was able to solve the problems. Therefore, if you use a free version of CWP then you should be an experienced linux administrator to solve the problems on your own. In case you use a free version and expect to get the professional assistance from the CWP support then it looks like you expect too much.

However, in case you want to get assistance from the CWP community then it will be good to provide more details about the problem experienced by you and provide some logs to clear the situation.

9
Functions / Re: Modifying email menu
« on: March 20, 2021, 12:00:58 PM »
Hi,

HTML templates of the user level interface are placed here:

/usr/local/cwpsrv/var/services/users/cwp_theme/original/

Look at the files called:

mod_email*
mod_forwarders*
mod_mail*

Most likely the modified files will be replaced by the original files once CWP is updated. So it is better to copy the theme files to another folder and modify the files there.

10
PHP / Re: ffmpeg enable shell_exec()
« on: March 19, 2021, 08:00:08 PM »
It sounds like you run some .php script and the script runs the ffmpeg binary using shell_exec() causing the error "shell_exec disabled".  Am I right ? If so do you run the script assocaited woth your website (http://domain.com/script.php) or over CWP (https://xx.xx.xx.xx.:2083/cwp_xxxxx/username/?module=somemodule) ?

Could you please provide more details about the problem ?

11
Functions / Question about hooks
« on: March 19, 2021, 05:18:50 PM »
Hi guys,

Is there some possibility to run the hooks before the account or domain name is created/added ?

I want to create a module/plugin (not sure how you call it here :) ) to block account creation and domain name/subdomain adding in case the username or domain name/subdomain is listed in some list managed by the server administrator so the users won't be able to add the domain names like "gmail.com", "hotmail.com", etc as the main domain names or addons of their accounts .

Thanks.

12
Functions / Re: CWP account hooks NOT WORK!!
« on: March 19, 2021, 05:08:18 PM »
Sorry for the necropost :)

Not sure if it cwp allows to print some output from the hooks. However the hooks described here:
https://wiki.centos-webpanel.com/action-hooks
work for me.

Here is a simple example (just a bit modified example provided by docs):

cat /usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_new.php

Code: [Select]

<?php
function account_new($array){
        
$fp fopen('/tmp/account_new.txt''w');
        
fwrite($fpprint_r($arrayTRUE));
        
fclose($fp);
}
?>



then create some account and review the file /tmp/account_new.txt.

Pages: [1]