Domain / subdomain problem

Compoint

Verified User
Joined
Jun 3, 2012
Messages
7
Hi,

i'm pretty new to this whole CentOS, DA thing and have encountered the following problem:

I installed CentOS 5.8 and the latest DA.
At first the website only showed me the content of var/www/html instead of the actual
DA webserver content. I managed to get this working correctly with changing
DocumentRoot to "/home/admin/domains/domain.com/public_html"
After that it shows the DA start page.

Now when i want to add a subdomain i can't access it trough subdomain.domain.com or www.subdomain.domain.com but i can access it trough domain.com/subdomain.

The domain in question is www.haskrediet.be and haspro.haskrediet.be

Any ideas?
 
Thanks for the reply.

I did that but it didn't help.

I checked the httpd.conf and user httpd.conf files and according to the pages on DA
it's all correct. Still i can't get the subdomains to work.

Seen a suggestion to add a domain instead of a subdomain containing subdomain.domain.com but that didn't help either.

Any other suggestions?
 
Maybe good to mention i have it running on a local ip.
Added an eth0:0, fixed iptables and got the DA to run.
After that i could only see var/www/html pages on the site.
Changed that in the httpd.conf to point to the public_html and got the DA page shown.
Then i added a subdomain but can't seem to get that shown on subdomain.domain.com.
Also looking at phpmyadmin, i can log in and see the phpmyadmin icon, but i get a blank page..

Please help
 
I guess you should check you DNS zone files for subdomains, you DNS still does not answer on queries about haspro.haskrediet.be

p.s. Feel free to PM me if you need a private help in terms of a commerce service.
 
I got the subdomain working (DNS is located elsewhere).
The thing now is that the website showed "Apache is working... "
I changed the DocumentRoot in /etc/httpd/conf/httpd.conf from
var/www/html to /home/admin/domains/mydomain.com/public_html
Shows the directadmin startscreen just fine but now when i go to
haspro.haskrediet.be i get the same startscreen instead of the 'subdomain' screen shown
in haskrediet.be/haspro

Weird things..
 
I add domains on the local DA with the subdomains link.

Looking at the virtualhost2_sub.conf it shows this:

Code:
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html/|                           
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|                  
<VirtualHost |IP|:|PORT_80| |MULTI_IP|>                                         
|CUSTOM|                                                                        
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|                           
        ServerName www.|SUB|.|DOMAIN|                                           
        ServerAlias www.|SUB|.|DOMAIN| |SUB|.|DOMAIN| |SERVER_ALIASES|          
        ServerAdmin |ADMIN|                                                     
        DocumentRoot |DOCROOT|/|SUB|                                            
        |CGI|                                                                   
                                                                                
        |USECANONICALNAME|                                                      
                                                                                
        <IfModule !mod_ruid2.c>                                                 
                SuexecUserGroup |USER| |GROUP|                                  
        </IfModule>                                                             
        <IfModule mod_ruid2.c>                                                  
                RMode config                                                    
                RUidGid |USER| |GROUP|  
               RGroups apache access                                           
        </IfModule>                                                             
                                                                                
        CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.bytes bytes             
        CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined            
        ErrorLog /var/log/httpd/domains/|DOMAIN|.|SUB|.error.log                
                                                                                
        |*if SUSPENDED_REASON|                                                  
        <IfModule mod_env.c>                                                    
                SetEnv reason |SUSPENDED_REASON|                                
        </IfModule>                                                             
        |*endif|                                                                
                                                                                
        <Directory |DOCROOT|/|SUB|>                                             
                Options +Includes -Indexes                                      
|*if HAVE_SAFE_MODE="1"|                                                        
                php_admin_flag safe_mode |SAFE_MODE|                            
|*endif|                  
|*if CLI="1"|                                                                   
                php_admin_flag engine |PHP|                                     
                php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USE$
|*endif|                                                                        
|*if OPEN_BASEDIR="ON"|                                                         
                php_admin_value open_basedir |OPEN_BASEDIR_PATH|                
|*endif|                                                                        
|*if SUPHP="1"|                                                                 
                suPHP_Engine |PHP|                                              
                suPHP_UserGroup |USER| |GROUP|                                  
|*endif|                                                                        
        </Directory>                                                            
|HANDLERS|                                                                      
|MIMETYPES|                                                                     
                                                                                
</VirtualHost>
 
jj@24Khosting: That didn't help a thing.

Situation:
DNS External
DA installed behind Firewall

haskrediet.be -> standard DA page
www.haskrediet.be -> standard DA page
haspro.haskrediet.be -> standard DA page (should be the subdomain placeholder)
haskrediet.be/haspro -> subdomain placeholder.

Things i've done:
Installed the unofficial DA LAN method
Added domain to DA
set A records at external DA
set A records at external DA for subdomain
created subdomain

Any help still appreciated!
 
PHP:
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|                           
        ServerName www.|SUB|.|DOMAIN|                                           
        ServerAlias www.|SUB|.|DOMAIN| |SUB|.|DOMAIN| |SERVER_ALIASES|          
        ServerAdmin |ADMIN|                                                     
        DocumentRoot |DOCROOT|/|SUB|                                            
        |CGI|

replace with

PHP:
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|                           
        ServerName |SUB|.|DOMAIN|                                           
        ServerAlias www.|SUB|.|DOMAIN| |SUB|.|DOMAIN| |SERVER_ALIASES|          
        ServerAdmin |ADMIN|                                                     
        DocumentRoot |DOCROOT|/|SUB|                                            
        |CGI|


restart apache

remove teh subdomain

readd subdomain.
 
Back
Top