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 - IgorA100

Pages: 1 [2] 3
16
Apache / Re: logrotate
« on: May 24, 2017, 11:32:53 AM »
I understand that initially the rotation of logs is not configured at all :(
I realized at myself as follows:
1. All logs are stored in the site directory.
Example:
/home/USER/www/vhosts/SITE/httpdocs- for site
/home/USER/www/vhosts/SITE/logs - for logs
Edit file /usr/local/apache/conf.d/vhosts.conf and add
Code: [Select]
ErrorLog "/home/USER/www/vhosts/SITE/logs/http_error.log"
CustomLog /home/USER/www/vhosts/SITE/logs/http_access.log combined
to the configuration of each virtual host. Then create the files http_error.log & http_access.log
2. In dir /etc/logrotate.d create file httpd with content:
Code: [Select]
/home/*/www/vhosts/*/logs/http_access.log /home/*/www/vhosts/*/logs/http_error.log /usr/local/apache/logs/access_log /usr/local/apache/logs/error_log /usr/local/apache/logs/suphp_log{
        maxsize 50000k
        notifempty
weekly
        rotate 8
        missingok
}

17
CentOS 7 Problems / Re: Apache not fun FAILE
« on: May 23, 2017, 10:28:24 PM »
Please publish the file /usr/local/apache/conf/sharedip.conf

18
CentOS-WebPanel Bugs / Apache log (not true IP in logs)
« on: May 21, 2017, 08:54:17 PM »
The Apache access.log logs indicate the external IP address of the server, and not the real one with which the request was made.
Correction in /usr/local/apache/conf/httpd.conf:
Find:
Code: [Select]
<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

Replece to:
Code: [Select]
<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%a %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

Correct please in the distribution and updates

19
Information / Storage log, config nginx & apache ()
« on: May 21, 2017, 06:16:37 PM »
I do not understand the logic of storing nginx configs for donen in the /etc/nginx/conf.d folder.
I do not understand the logic of storing apache configs for all donen in one /usr/local/apache/conf.d/vhosts.conf file
I do not understand the logic of storing nginx logs for donen in the /var/logs/nginx folder.
I do not understand the logic of storing apache logs for all donen in the /usr/local/apache/logs folder. In this case, the logs are not separated into domains! Analyzing logs it is not possible to understand to which of the sites belongs to the log line!

It is more logical to store all the configs and logs in the domain directory. Having a certain structure:
HOME_DIR/www/vhosts/DOMEN_NAME - base dir
HOME_DIR/www/vhosts/DOMEN_NAME/http - dir for site
HOME_DIR/www/vhosts/DOMEN_NAME/conf- dir for config files
HOME_DIR/www/vhosts/DOMEN_NAME/logs- dir for config logs

With each directory of logs, make the symlink in the directory /var/log for more convenient analysis by admin.

So in fact it will be much more convenient and each user will be able to more accurately configure for themselves configs and view the logs of their sites.

All this is not much work!

20
Updates / I have problem update cwp-httpd
« on: May 17, 2017, 10:53:59 AM »

Code: [Select]
[root@office ~]# yum update cwp-httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.logol.ru
 * epel: www.nic.funet.fi
 * extras: mirror.logol.ru
 * updates: mirror.logol.ru
Resolving Dependencies
--> Running transaction check
---> Package cwp-httpd.x86_64 0:2.4.25-4 will be updated
---> Package cwp-httpd.x86_64 0:2.4.25-5 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================================================
 Package                                           Arch                                           Version                                          Repository                                   Size
=====================================================================================================================================================================================================
Updating:
 cwp-httpd                                         x86_64                                         2.4.25-5                                         cwp                                         5.3 M

Transaction Summary
=====================================================================================================================================================================================================
Upgrade  1 Package

Total download size: 5.3 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for cwp
cwp-httpd-2.4.25-5.x86_64.rpm  FAILED
http://repo.centos-webpanel.com/repo/7/x86_64/cwp-httpd-2.4.25-5.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found                                                 ]  0.0 B/s |    0 B  --:--:-- ETA
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/



Error downloading packages:
  cwp-httpd-2.4.25-5.x86_64: [Errno 256] No more mirrors to try.

[root@office ~]#

Code: [Select]
[root@office yum.repos.d]# cat cwp.repo
[cwp]
name=CentOS Web Panel repo for Linux 7 - $basearch
baseurl=http://repo.centos-webpanel.com/repo/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0

[root@office yum.repos.d]#

21
I will block all future updates and communication with cwp servers
How to do this?

22
This isn't the first time with similar issues after update.
Oh my God, I'm not alone. :o
The administration is silent and it seems is not going to improve the situation.
It helped me: Select WebSerwers=>Apache & Nginx Reverse Proxy (Nginx on port 80 and apache on port 8181) & Save and rebuild configuration.
I have more than once regretted that I installed the CVP. Very, very many bugs.
This is not a release and not even betta, but rather an alpha version: (

23
PHP / I'm shocked by the work php.ini
« on: April 30, 2017, 08:05:47 PM »
If there is php.ini in the user directory, then the main /usr/local/php/php.ini is ignored!

I made enough changes (more than 10 lines) in the main php.ini
I want to make personal php.ini for several sites and add 1-2 lines to them.
How to be?

24
CentOS-WebPanel Bugs / Delete suspended user
« on: April 29, 2017, 09:21:36 PM »
Remains not deleted file "/usr/local/apache/conf.d/suspended_accounts/suspendedUser.conf" after removal of the suspended user.

25
CentOS-WebPanel Bugs / Duplicating DNS zones
« on: April 29, 2017, 11:05:04 AM »
1. Two identical domains are created for different users - there is no error, everything is fine.
2. At the same time, a duplicate DNS zone is created in the /var/named/example.db file, which leads to an error when restarting the DNS service !

26
Sorry, I incorrectly expressed.
I am changing "Edit apache vHosts".
Logically, after that, the automatic changes are applied. Or there should be a button "apply changes"
If I press "Rebuild virtual Hosts, then this command will overwrite all changes included in the "apache vHosts" according to the template settings vHosts.

I am sorry for my bad english

27
CentOS-WebPanel Bugs / Re: Does not create nested directories
« on: April 29, 2017, 07:55:39 AM »
then simply specify full path for domain where it will be
Where should I specify the full path?

28
When you change the template, it is normally saved, the template does not apply!
It is necessary to manually restart httpd service :(

29
CentOS-WebPanel Bugs / Re: Does not create nested directories
« on: April 28, 2017, 04:29:15 PM »
I want to organize the structure:
User homedir - This is the user directory.
User homedir / www - Everything connected with hosting User
User homedir / www / vhosts - There are several user domains
User homedir / www / repo - This is an SVN repository
User homedir / ftp - User FTP
User homedir / cgi-bin - User scripts
ETC....
Why can not I do this?

For example, I'm used to working in the Plesk panel. There, the structure of the user directory is created very competently with the default template.

30
Ohohoh.....
Apache vHosts Template $ edit to "Apache Domain Virtual Host tpl:":
Code: [Select]
# vhost_start %domain_name%
<VirtualHost %domain_ip%:%domain_port%>
ServerName %domain_name%
ServerAlias www.%domain_name%
ServerAdmin %admin_email%
DocumentRoot "%homedir%/%username%/vhosts/%domain_name%/httpdocs"
ScriptAlias /cgi-bin/ "%homedir%/%username%/vhosts/%domain_name%/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/%username%/%domain_name%/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup %username% %username%
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup %username% %username%
        suPHP_ConfigPath /home/%username%
</IfModule>

<Directory "%homedir%/%username%/vhosts/%domain_name%/httpdocs">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end %domain_name%

- I run: "Rebuild Virtual Hosts"
- I add new user:
Code: [Select]
Changing password for user asd.
passwd: all authentication tokens updated successfully.
Changing shell for asd.
Shell changed.

--> Template exist. Copying template files to /home/asd/public_html/


# vhost_start qw
<VirtualHost 185.123.192.102:8181>
ServerName qw
ServerAlias www.qw
ServerAdmin igor@kentavr.com.ru
DocumentRoot "/home/asd/vhosts/qw/httpdocs"
ScriptAlias /cgi-bin/ "/home/asd/vhosts/qw/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/asd/qw/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup asd asd
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup asd asd
        suPHP_ConfigPath /home/asd
</IfModule>

<Directory "/home/asd/vhosts/qw/httpdocs">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end qw


Account Details
========================================
Server IP: 185.123.192.102
Web Panel Login:
Domain: qw
Username: asd
Password: gKdH5W0m
Admin Email: igor@kentavr.com.ru

Panel URL: http://185.123.192.102:2030

NameServers:
ns1.centos-webpanel.com
ns2.centos-webpanel.com

Check Account Create Details
--> Checking if "/home/asd/public_html" folder if exist: [YES]

Reloading httpd server:

Reloading DNS zones

server reload successful
The virtual host settings point correctly, but the directories are not created correctly!  :'(

Pages: 1 [2] 3