This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Adding a domain causes disabling others in vhosts file
#1
Adding a domain causes disabling others in vhosts file
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.
Reply
Thanks given by:
#2
RE: Adding a domain causes disabling others in vhosts file
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
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: Adding a domain causes disabling others in vhosts file
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
Reply
Thanks given by:
#4
RE: Adding a domain causes disabling others in vhosts file
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
Reply
Thanks given by:
#5
RE: Adding a domain causes disabling others in vhosts file
What do i do, how do i set them apart?
Reply
Thanks given by:
#6
RE: Adding a domain causes disabling others in vhosts file
Do i have to delete the :80 one, and leave only one instead? And then manually edit like in the docs?
Reply
Thanks given by:
#7
RE: Adding a domain causes disabling others in vhosts file
only one will survive you can't have both with same hosts.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#8
RE: Adding a domain causes disabling others in vhosts file
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.
Reply
Thanks given by: vprocopan
#9
RE: Adding a domain causes disabling others in vhosts file
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.
Reply
Thanks given by: vprocopan
#10
RE: Adding a domain causes disabling others in vhosts file
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)
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Increase disk space by adding volume only, it is okay? 7rdoq 10 691 11-06-2024, 07:27 AM
Last Post: TGates
How to set up File Manger for Sentora? donaldaugust 1 3 ,858 01-11-2022, 05:01 AM
Last Post: Nigel
Public_html Inside Domain/Subdomain zHostingSolutions 2 5 ,015 07-23-2021, 09:57 AM
Last Post: Nigel

Forum Jump:


Users browsing this thread: 1 Guest(s)