Custom Vhost entries problem - Not working
#1
Custom Vhost entries problem - Not working
Hi! I followed this guide: (to create a vhost entry: webmail)
http://forums.sentora.org/showthread.php?tid=495
and apache says:
Code:
AH00526: Syntax error on line 384 of /etc/sentora/configs/apache/httpd-vhosts.conf: <VirtualHost> cannot occur within <VirtualHost> section

And it is true. When searching for that line i found:

# DOMAIN: domain.es
<virtualhost *:80>
ServerName domain.es
ServerAlias  www.domain.es
ServerAdmin aaba@aaasasaa.com
DocumentRoot "/var/sentora/hostdata/domain/public_html/domain_es"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc$
ErrorLog "/var/sentora/logs/domains/angelsanchez/domain.es-error.log"
CustomLog "/var/sentora/logs/domains/angelsanchez/domain.es-access.log" combined
CustomLog "/var/sentora/logs/domains/angelsanchez/domain.es-bandwidth.log" common
<Directory "/var/sentora/hostdata/angelsanchez/public_html/domain_es">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 510 /_errorpages/510.html
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)
   # Configuration for WebMail - webmail.yoursite.tld
   <VirtualHost *:80>
   ServerAdmin info@domain.es
       DocumentRoot "/var/zpanel/panel/etc/apps/webmail/"
       ServerName webmail.domain.es
   AddType application/x-httpd-php .php3 .php
       <Directory />
       Options FollowSymLinks Indexes
       AllowOverride All
       Order Allow,Deny
       Allow from all
       </Directory>
   </VirtualHost>
</virtualhost>

# END DOMAIN: domain.es
################################################################

So, there is a virtual host inside an other one.

I think that if I delete the <VirtualHost *:80> and the </VirtualHost> in the custom setting it will work, ¿right?
#2
RE: Custom Vhost entries problem - Not working
start you custom entry with </virtualhost> & don't close the virtual host at the end with : </virtualhost>

I still think this is not how we should add custom entries. If you want to add some custom vhosts better adding them to apache config files.

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
#3
RE: Custom Vhost entries problem - Not working
(11-24-2014, 09:53 PM)Me.B Wrote: start you custom entry with </virtualhost> & don't close the virtual host at the end with : </virtualhost>

I still think this is not how we should add custom entries. If you want to add some custom vhosts better adding them to apache config files.

M B

DAMN! As I can see, in the how-to thread (http://forums.sentora.org/showthread.php?tid=495) the entry starts with </virtualhost>.

My fault, of course. Thanks a lot for your help.

EDIT: I think it would be more clear if you separate the vhosts:

------------------------------

# Configuration for phpMyAdmin - mysql.yoursite.tld
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster[at]yoursite.tld
DocumentRoot "C:/zpanel/panel/etc/apps/phpmyadmin/"
ServerName mysql.yoursite.tld
AddType application/x-httpd-php .php3 .php
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
-----------------------------

And so on. Its a little confusing: you need to start de vhost entry CLOSING virtualhost, and you don need to close it. (As the example I pasted)

In the how-to thread it looks "strange".

Greets.
#4
RE: Custom Vhost entries problem - Not working
It's a hack and we should set better ways for handling it.

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


Possibly Related Threads…
Thread Author Replies Views Last Post
Problem with roundcube pgh2011 0 3 ,165 01-30-2021, 12:48 AM
Last Post: pgh2011
Import zpanel settings problem pgh2011 0 3 ,197 12-30-2020, 07:08 PM
Last Post: pgh2011
Senator crash problem with mysql provokas 3 12 ,245 08-20-2020, 04:11 AM
Last Post: Your Creator

Forum Jump:


Users browsing this thread: 1 Guest(s)