Posts: 74
Threads: 17
Joined: Sep 2014
Reputation:
0
Thanks: 11
Given 1 thank(s) in 1 post(s)
Adding a domain causes disabling others in vhosts file
09-16-2014, 05:04 PM
As described in the Subject, when I add a domain, or make changes to domains (or subdomain), it causes disabling many domains in vhosts file, the issue is caused by manual editing of vhosts for adding SSL for one of the site (as described by the previous Systems Administrator), now i have to setup this as it is suposed to be, by web interface I guess, i also have the thread in Zpanel support forum, but it isn't working anymore, please help me troubleshoot this issue.
Posts: 4 ,002
Threads: 193
Joined: Jul 2014
Reputation:
83
Sex: Undisclosed
Thanks: 72
Given 435 thank(s) in 395 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-16-2014, 05:28 PM
You can't manually edit Vhost file as it will regenerated FULLY after any website modified (added/deleted).
If you want to setup custom config you must do that thru
modules admin > apache config > select Vhost and add the custom data there.
M B
Posts: 74
Threads: 17
Joined: Sep 2014
Reputation:
0
Thanks: 11
Given 1 thank(s) in 1 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 01:20 PM
(This post was last modified: 09-17-2014, 02:11 PM by vprocopan.)
When i edit domains the following changes commit, domains become disabled
Code: ################################################################
# Apache VHOST configuration file
# Automatically generated by ZPanel 10.1.1
# Generated on: 18:45 22nd Aug 2014 EEST
################################################################
NameVirtualHost *:80
NameVirtualHost *:443
# Configuration for ZPanel control panel.
<VirtualHost *:80>
ServerAdmin zadmin@localhost
DocumentRoot "/etc/zpanel/panel/"
ServerName panel.webmastermd.net
ServerAlias *.panel.webmastermd.net
AddType application/x-httpd-php .php
<Directory "/etc/zpanel/panel/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Custom settings are loaded below this line (if any exist)
</VirtualHost>
################################################################
# ZPanel generated VHOST configurations below.....
################################################################
# DOMAIN: comfi.md
<virtualhost *:80>
ServerName comfi.md
ServerAlias comfi.md www.comfi.md
ServerAdmin zadmin@localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/comfi_md"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/comfi_md:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
ErrorLog "/var/zpanel/logs/domains/zadmin/comfi.md-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/comfi.md-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/comfi.md-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options ExecCGI -Indexes
</location>
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
# Custom Global Settings (if any exist)
# Custom VH settings (if any exist)
</virtualhost>
# END DOMAIN: comfi.md
################################################################
# DOMAIN: amoresparaiso.com
# THIS DOMAIN HAS BEEN DISABLED
<virtualhost *:443>
ServerName amoresparaiso.com
ServerAlias amoresparaiso.com www.amoresparaiso.com
ServerAdmin zadmin@localhost
DocumentRoot "/etc/zpanel/panel/etc/static/disabled"
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
</virtualhost>
# END DOMAIN: amoresparaiso.com
################################################################
before that everything is ok
Code: ################################################################
# Apache VHOST configuration file
# Automatically generated by ZPanel 10.1.1
# Generated on: 00:05 1st Aug 2014 EEST
################################################################
NameVirtualHost *:80
NameVirtualHost *:443
# Configuration for ZPanel control panel.
<VirtualHost *:80>
ServerAdmin zadmin@localhost
DocumentRoot "/etc/zpanel/panel/"
ServerName panel.webmastermd.net
ServerAlias *.panel.webmastermd.net
AddType application/x-httpd-php .php
<Directory "/etc/zpanel/panel/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Custom settings are loaded below this line (if any exist)
</VirtualHost>
################################################################
# ZPanel generated VHOST configurations below.....
################################################################
# DOMAIN: comfi.md
<virtualhost *:80>
ServerName comfi.md
ServerAlias comfi.md www.comfi.md
ServerAdmin zadmin@localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/comfi_md"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/comfi_md:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
ErrorLog "/var/zpanel/logs/domains/zadmin/comfi.md-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/comfi.md-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/comfi.md-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options ExecCGI -Indexes
</location>
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
# Custom Global Settings (if any exist)
# Custom VH settings (if any exist)
</virtualhost>
# END DOMAIN: comfi.md
################################################################
# DOMAIN: amoresparaiso.com
<virtualhost *:80>
ServerName amoresparaiso.com
ServerAlias amoresparaiso.com www.amoresparaiso.com
ServerAdmin zadmin@localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/amoresparaiso_com"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/amoresparaiso_com:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
ErrorLog "/var/zpanel/logs/domains/zadmin/amoresparaiso.com-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/amoresparaiso.com-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/amoresparaiso.com-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options ExecCGI -Indexes
</location>
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
Redirect Permanent / https://amoresparaiso.com/
# Custom Global Settings (if any exist)
# Custom VH settings (if any exist)
</virtualhost>
<virtualhost *:443>
ServerName amoresparaiso.com:443
ServerAlias amoresparaiso.com www.amoresparaiso.com
ServerAdmin zadmin@localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/amoresparaiso_com"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/amoresparaiso_com:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open$
ErrorLog "/var/zpanel/logs/domains/zadmin/amoresparaiso.com-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/amoresparaiso.com-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/amoresparaiso.com-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options ExecCGI -Indexes
</location>
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 404 /_errorpages/404.html
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile /etc/ssl/certs/amoresparaiso.crt
SSLCertificateKeyFile /etc/ssl/certs/private.key
SSLCertificateChainFile /etc/ssl/certs/certificate-CA.cer
</virtualhost>
# END DOMAIN: amoresparaiso.com
################################################################
# DOMAIN: webmaster.vika
<virtualhost *:80>
ServerName webmaster.vika
ServerAlias webmaster.vika www.webmaster.vika
ServerAdmin zadmin@localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/webmaster_vika"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/webmaster_vika:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
ErrorLog "/var/zpanel/logs/domains/zadmin/webmaster.vika-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/webmaster.vika-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/webmaster.vika-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
Please help me resolve this issue
Posts: 3 ,663
Threads: 241
Joined: May 2014
Reputation:
85
Sex: Male
Thanks: 408
Given 599 thank(s) in 464 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 02:58 PM
thats because you have 2 ports for one vhost...
Check out the docs for how to do SSL:
http://docs.sentora.org/?node=20
-TGates - Project Council
SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE
Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Posts: 74
Threads: 17
Joined: Sep 2014
Reputation:
0
Thanks: 11
Given 1 thank(s) in 1 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 03:03 PM
What do i do, how do i set them apart?
Posts: 74
Threads: 17
Joined: Sep 2014
Reputation:
0
Thanks: 11
Given 1 thank(s) in 1 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 03:06 PM
(This post was last modified: 09-17-2014, 03:18 PM by vprocopan.)
Do i have to delete the :80 one, and leave only one instead? And then manually edit like in the docs?
Posts: 4 ,002
Threads: 193
Joined: Jul 2014
Reputation:
83
Sex: Undisclosed
Thanks: 72
Given 435 thank(s) in 395 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 05:25 PM
only one will survive you can't have both with same hosts.
M B
Posts: 188
Threads: 7
Joined: Jul 2014
Reputation:
4
Sex: Male
Thanks: 2
Given 53 thank(s) in 30 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 07:18 PM
I may have read this incorrectly so say if i have... However if you directly edit the httpd-vhosts.conf file your changes will be removed on the next update by zpanel/sentora.
I could recommend adding an include statement at the bottom of the httpd.conf file in /etc/zpanel/configs/apache2/httpd.conf to a httpd-custom-vhosts.conf so your changes / custom vhosts are retained.
Posts: 188
Threads: 7
Joined: Jul 2014
Reputation:
4
Sex: Male
Thanks: 2
Given 53 thank(s) in 30 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 07:20 PM
Oh two ports one vhost ... i did skim read too quickly...
You don't need the port 80 on that vhost, use the module admin - vhost override features to implement automatic port 80 forwarding and the custom port of 443.
Posts: 74
Threads: 17
Joined: Sep 2014
Reputation:
0
Thanks: 11
Given 1 thank(s) in 1 post(s)
RE: Adding a domain causes disabling others in vhosts file
09-17-2014, 09:53 PM
The first domain isn't the only one that gets disabled, when i make changes, But I'll try to remove the first one (amoresparaiso.com) that comes with :80 port, tomorrow at 5:00, so users we'll be sleeping, hopefully it will fix something. Do I have to edit it manually to remove the second port from vhosts, or do i use the apache module admin? (Im asking about the structure integrity of the vhosts file)
|