0

On my newserver i set up a subdomain patientslife.linf.in. But when i try to set up another subdomain pmr.linf.in it shows the page The connection was reset in Mozilla and No data received in chrome. I write the following line in my httpd.conf to setup

    <VirtualHost my-ip:80>
    ServerAdmin admin@linf.in
    DocumentRoot /var/www/html/pmr.linf.in/app/webroot
    ServerName www.pmr.linf.in
    ServerAlias pmr.linf.in
    <Directory "/var/www/html/pmr.linf.in">
    AllowOverride All
    </Directory>
    </VirtualHost>


My site is in cakephp framework.
The css files and other files in the document root canbe accessible by url. But cannot load the webpages. I cross checked all the .htaccess files with the working domain's .htaccess. Both of them are same.

1 Answers1

0

setup name based virtual host if you want to host multiple domains or subdomains in single ip

<VirtualHost pmr.linf.in:80>
ServerAdmin admin@linf.in
DocumentRoot /var/www/html/pmr.linf.in/app/webroot
ServerName www.pmr.linf.in
ServerAlias pmr.linf.in
<Directory "/var/www/html/pmr.linf.in">
AllowOverride All
</Directory>
</VirtualHost>

<VirtualHost patientslife.linf.in:80>
ServerAdmin admin@linf.in
DocumentRoot /var/www/html/patientslife.linf.in/data/path/
ServerName patientslife.linf.in
ServerAlias patientslife.linf.in
<Directory "/var/www/html/patientslife.linf.in">
AllowOverride All
</Directory>
</VirtualHost>

Do the changes as you have information. above is just an sample

  • check closely in virtual host tag. I have given domain name. The .htaccess might be reason to get the correct domain name. if you put * – sharad chhetri Aug 23 '13 at 18:40
  • I edited actually, not so much do blockquote in server fault. If by this it did not resolve then lets check the content of .htaccess – sharad chhetri Aug 23 '13 at 18:49