Sentora Support Forums
Sub_domain not working - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: Sub_domain not working (/showthread.php?tid=613)

Pages: 1 2


Sub_domain not working - Computerama - 11-09-2014

After installing Sentoracp and creating domains, I set up dns.
Domain populated just fine and works. After that I created a sub_domain called test.mydomain.com. I then set it up in dns in cname. I waited 48 hours and it only points to Sentoracp login screen. I checked Global dns Propagation and all pointed to server.
Here is the vhosthost conf.

################################################################
# Apache VHOST configuration file
# Automatically generated by Sentora 1.0.0
# Generated on: 10:05 8th Nov 2014 PST
#==== YOU MUST NOT EDIT THIS FILE : IT WILL BE OVERWRITTEN ====
# Use Sentora Menu -> Admin -> Module Admin -> Apache config
################################################################

Listen 80

# Configuration for Sentora control panel.
<VirtualHost *:80>
ServerAdmin zadmin@localhost
DocumentRoot "/etc/sentora/panel/"
ServerName cp.computeramaspokane.net
ErrorLog "/var/sentora/logs/sentora-error.log"
CustomLog "/var/sentora/logs/sentora-access.log" combined
CustomLog "/var/sentora/logs/sentora-bandwidth.log" common
AddType application/x-httpd-php .php
<Directory "/etc/sentora/panel/">
Options +FollowSymLinks -Indexes
   AllowOverride All
   Require all granted
</Directory>

# Custom settings are loaded below this line (if any exist)

</VirtualHost>

################################################################
# Sentora generated VHOST configurations below.....
################################################################

# DOMAIN: computeramaspokane.net
<virtualhost *:80>
ServerName computeramaspokane.net
ServerAlias  www.computeramaspokane.net
ServerAdmin zadmin@localhost
DocumentRoot "/var/sentora/hostdata/zadmin/public_html/computeramaspokane_net"
php_admin_value open_basedir "/var/sentora/hostdata/zadmin/public_html/computeramaspokane_net:/var/sentora/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/sentora/logs/domains/zadmin/computeramaspokane.net-error.log"
CustomLog "/var/sentora/logs/domains/zadmin/computeramaspokane.net-access.log" combined
CustomLog "/var/sentora/logs/domains/zadmin/computeramaspokane.net-bandwidth.log" common
<Directory "/var/sentora/hostdata/zadmin/public_html/computeramaspokane_net">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 403 (2) /_errorpages/403 (2).html
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 510 (2) /_errorpages/510 (2).html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 404 (2) /_errorpages/404 (2).html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 500 (2) /_errorpages/500 (2).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)

</virtualhost>
# END DOMAIN: computeramaspokane.net
################################################################


# DOMAIN: linkpc.net
<virtualhost *:80>
ServerName linkpc.net
ServerAlias  www.linkpc.net
ServerAdmin zadmin@localhost
DocumentRoot "/var/sentora/hostdata/zadmin/public_html/linkpc_net"
php_admin_value open_basedir "/var/sentora/hostdata/zadmin/public_html/linkpc_net:/var/sentora/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/sentora/logs/domains/zadmin/linkpc.net-error.log"
CustomLog "/var/sentora/logs/domains/zadmin/linkpc.net-access.log" combined
CustomLog "/var/sentora/logs/domains/zadmin/linkpc.net-bandwidth.log" common
<Directory "/var/sentora/hostdata/zadmin/public_html/linkpc_net">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 500 /_errorpages/500.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)

</virtualhost>
# END DOMAIN: linkpc.net
################################################################


# DOMAIN: belle.linkpc.net
<virtualhost *:80>
ServerName belle.linkpc.net
ServerAdmin zadmin@localhost
DocumentRoot "/var/sentora/hostdata/zadmin/public_html/belle_linkpc_net"
php_admin_value open_basedir "/var/sentora/hostdata/zadmin/public_html/belle_linkpc_net:/var/sentora/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/sentora/logs/domains/zadmin/belle.linkpc.net-error.log"
CustomLog "/var/sentora/logs/domains/zadmin/belle.linkpc.net-access.log" combined
CustomLog "/var/sentora/logs/domains/zadmin/belle.linkpc.net-bandwidth.log" common
<Directory "/var/sentora/hostdata/zadmin/public_html/belle_linkpc_net">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 500 /_errorpages/500.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)

</virtualhost>
# END DOMAIN: belle.linkpc.net
################################################################


# DOMAIN: test.computeramaspokane.net
<virtualhost *:80>
ServerName test.computeramaspokane.net
ServerAdmin zadmin@localhost
DocumentRoot "/var/sentora/hostdata/zadmin/public_html/test_computeramaspokane_net"
php_admin_value open_basedir "/var/sentora/hostdata/zadmin/public_html/test_computeramaspokane_net:/var/sentora/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/sentora/logs/domains/zadmin/test.computeramaspokane.net-error.log"
CustomLog "/var/sentora/logs/domains/zadmin/test.computeramaspokane.net-access.log" combined
CustomLog "/var/sentora/logs/domains/zadmin/test.computeramaspokane.net-bandwidth.log" common
<Directory "/var/sentora/hostdata/zadmin/public_html/test_computeramaspokane_net">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 500 /_errorpages/500.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)

</virtualhost>
# END DOMAIN: test.computeramaspokane.net
################################################################


# DOMAIN: 420.linkpc.net
<virtualhost *:80>
ServerName 420.linkpc.net
ServerAdmin zadmin@localhost
DocumentRoot "/var/sentora/hostdata/zadmin/public_html/420_linkpc_net"
php_admin_value open_basedir "/var/sentora/hostdata/zadmin/public_html/420_linkpc_net:/var/sentora/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/sentora/logs/domains/zadmin/420.linkpc.net-error.log"
CustomLog "/var/sentora/logs/domains/zadmin/420.linkpc.net-access.log" combined
CustomLog "/var/sentora/logs/domains/zadmin/420.linkpc.net-bandwidth.log" common
<Directory "/var/sentora/hostdata/zadmin/public_html/420_linkpc_net">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 500 /_errorpages/500.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)

</virtualhost>
# END DOMAIN: 420.linkpc.net
################################################################

Here is the zone record.

$TTL 10800
@ IN SOA ns1.computeramaspokane.net. postmaster.computeramaspokane.net. (
2014110801 ;serial
21600 ;refresh after 6 hours
3600 ;retry after 1 hour
604800 ;expire after 1 week
86400 ) ;minimum TTL of 1 day
@ 3600 IN A 65.103.141.250
mail 86400 IN A 65.103.141.250
ns1 172800 IN A 65.103.141.250
ns2 172800 IN A 65.103.141.251
cp 86400 IN A 65.103.141.250
test 3600 IN A 65.103.141.250
www 3600 IN CNAME @
ftp 3600 IN CNAME @
@ 86400 IN MX 10 mail.computeramaspokane.net.
@ 172800 IN NS ns1.computeramaspokane.net.
@ 172800 IN NS ns2.computeramaspokane.net.


RE: Sub_domain not working - Me.B - 11-09-2014

http://www.intodns.com/computeramaspokane.net

DNS servers responded ERROR: One or more of your nameservers did not respond:
The ones that did not respond are:
65.103.141.251

BUT I see test.computeramaspokane.net.
reponding

65.103.141.250

So this is not dns issue but vhost not loading.

Would you try to restart apache manually??


RE: Sub_domain not working - Computerama - 11-09-2014

When trying to restart I get

* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 51 of /etc/sentora/configs/apache/httpd-vhosts.conf:
ErrorDocument takes two arguments, Change responses for HTTP errors
Action 'configtest' failed.


RE: Sub_domain not working - Computerama - 11-09-2014

Ok So I could not manually restart apache so I re started the server now apache will not start at all. same error. The line it says the error is at has this on it.

ErrorDocument 403 (2) /_errorpages/403 (2).html


RE: Sub_domain not working - Computerama - 11-09-2014

There are a couple of lines like this in the first domain in vhost. none of the others have this. To me it don't look correct.


RE: Sub_domain not working - Computerama - 11-09-2014

Ok found the problem. Sub_domain now works and apache starts. When creating the first domain this is what it puts in.

AddType application/x-httpd-php .php3 .php
ErrorDocument 403 (2) /_errorpages/403 (2).html
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 510 (2) /_errorpages/510 (2).html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 404 (2) /_errorpages/404 (2).html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 500 (2) /_errorpages/500 (2).html

The ones with (2) need to be removed. This fixes the problem.

Now why it puts them in there Not sure.


RE: Sub_domain not working - Computerama - 11-09-2014

Update. every time the vhost is written it puts the lines back in and sub_domain don't work. What file is creating the vhost.cofig?


RE: Sub_domain not working - Me.B - 11-10-2014

did you modify vhosts? Tried to add SSL support?

Using vhost modification in apache config?

M B


RE: Sub_domain not working - Computerama - 11-10-2014

I am good at trouble shooting and finding problems but when it comes to fixing I need some help. So Using vhost modification in apache config? I am not sure how to. All I know when a sub_domain is created it adds some lines that apache will error out on the line looks like this.

This one is incorrect and stops apache
ErrorDocument 403 (2) /_errorpages/403 (2).html

This one is correct.
ErrorDocument 403 /_errorpages/403.html

All I know how to do is edit the main vhost file witch will fix the problem until it is rewritten.


RE: Sub_domain not working - Me.B - 11-10-2014

I didn't ask you to fix it manually!

I asked if you changed any thing in vhosts config. Ok will check this error very strange.

Seem a strange sed bug or alike. @[5050]