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.

Sub_domain not working
#1
Sub_domain not working
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.
Thanks given by:
#2
RE: Sub_domain not working
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??
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Thanks given by:
#3
RE: Sub_domain not working
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.
Thanks given by:
#4
RE: Sub_domain not working
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
Thanks given by:
#5
RE: Sub_domain not working
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.
Thanks given by:
#6
RE: Sub_domain not working
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.
Thanks given by:
#7
RE: Sub_domain not working
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?
Thanks given by:
#8
RE: Sub_domain not working
did you modify vhosts? Tried to add SSL support?

Using vhost modification in apache config?

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
Thanks given by:
#9
RE: Sub_domain not working
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.
Thanks given by:
#10
RE: Sub_domain not working
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
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Thanks given by: Computerama


Possibly Related Threads…
Thread Author Replies Views Last Post
Add on Domains not working but Main domain works luckyviet 2 6 ,370 03-18-2020, 07:38 PM
Last Post: AanaNahum
working on single domain bahabi 1 4 ,838 08-27-2019, 12:06 AM
Last Post: TGates
DNS Stopped Working hthiers 3 7 ,735 05-10-2019, 06:00 AM
Last Post: hthiers

Forum Jump:


Users browsing this thread: 4 Guest(s)