After installing Hosting Control Panel Web Panel CentOS, the first task is dancing with a tambourine turned a half-day course that greatly undermined its credibility in my eyes, as compared with the same VestaCP, because it is all the same socket is designed to make life easier for the administrator and not parse the config files and broken heads over what the author wanted to say.
The idea that he tried to tie the two domain Sata and added the first domain via the user account successfully, but when you try to add a second domain via a second account - only the first site in both domains.
Dig deeper, I tried to hang on both domains detached account, but why suddenly broken once and for all, instead of sites, the Web server began to give credit default text page Apache "HTTP Test Page powered by CentOS-WebPanel.com", despite the fact that the virtual hosts were spelled correctly. If stupid to pour content into / usr / local / apache / htdocs / is added to all domains will be given the default domain, but the trouble is that there are all of the system adjusted the like phpadmina, which is not good.
Tried all that is possible, is an educated bet and picking has not revealed that this is due to port conflict Apache, which in socket CWP already configured in three places, and that until they are brought to a common denominator, nothing will work:
Dashboard -> CWP Settings -> Edit Settings from the port is written in the form NameVirtualHost% Shared IP%:% Apache Port% in the config /usr/local/apache/conf/sharedip.conf
Shared the IP and the Apache Port esessno you specify a menu
Dashboard -> Apache Settings -> Apache Configuration ruling apache config /usr/local/apache/conf/httpd.conf where the directive Listen 80 is placed Port
Dashboard -> Apache Settings -> Edit Apache vHosts who climbs into the config /usr/local/apache/conf.d/vhosts.conf
Here all three points must be set the same port, and then your hands, you have to edit:
Change Shared IP 127.0.0.1 unnecessarily on this miserable barrel organ CWP, otherwise cocks on the external IP is the only virtual host, who is looking in the default directory / usr / local / apache / htdocs / and where the test page displays the default 'Web server Apache. And best of all commenting out the entire file, because in this case the CWP does not try to rewrite it in the apache config edits.
Register your Apache configuration directive NameVirtualHost *: 80 which would, if all other ports are the same, all the domains begin to work correctly. Without this directive, with the concurrence of all ports and SharedIP vystavlennom127.0.0.1, all domains will only show the first virtual host.
But then starts even more hemorrhagic, because of any changes in the configs, CWP overwrite /usr/local/apache/conf/sharedip.conf relevant directives, lifting all default domain, so the procedure for enabling caching Varnish, is as follows : first change in paragraphs 2 and 3 ports 80 on a thread 82 or 8181, and then put this in Dashboard -> Apache Settings -> Varnish Cache Server all parameters, then the console comment on all entries in the file / usr / local / apache / conf / sharedip.conf and restart & Varnish A Cache Apache Server: # service httpd restart # restart service varnish
With caching of Nginx also have to shaman, because when you turn caching Nginx, engine CWP writes garbage completely from the bulldozer, as well as the ports of the curve changes, because the settings and virtual hosts apache config directive NameVirtualHost *: 80 ports will have to change hands at 8181.
Thereafter /usr/local/apache/conf.d/rpaf.conf file and change the line RPAF_ProxyIPs 127.0.0.1 127.0.0.1 to your appearance the IP RPAF_ProxyIPs 37.187.114.200 and checks loaded library LoadModule rpaf_module modules / mod_rpaf .so as in my case file referred to /usr/local/apache/modules/mod_rpaf.so been absent from the folder / usr / lib64 and had perelinkovyvat to / usr / lib / httpd / modules / mod_rpaf
After that go to the virtual host config Nginx /etc/nginx/conf.d/site.ru and change settings listen 127.0.0.1:80; root DocumentRoot; on the current path to the folder with the documents of the site and all the IP listen 80; root / home / site / public_html;
