As we wanr Dynamic Subdomains
It means we want to allow any of text in place of "www" like..
abc.domain.com
xyz.domain.com
.......
*.domain.com
For this I do two things
1.- First I modified the DNS zone of domain.com to accept all *.domain.com requests with an A record of ***.**.***.**
(Your srv IP Address)
2.- Next, edited Apache's conf to accept *.domain.com
<VirtualHost ***.**.***.**:8 0>
DocumentRoot /var/www/vhosts/domain.com/httpdocs/
ServerName www.domain.com
ServerAlias *.domain.com
</VirtualHost>
NOw these all things are done perfactly,and my domain is allow me to write any thing in place of "www"
but when I write
anything.domain .com
it will sucessfully reach the site (Documentroot) and access the HTML files,
But PHP files are not acceses and Browser ask me to download the PHP files,
there is a message like "applicatio n/x-httpd-php"..
I also add
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
lines in Apache configuration files But my problem is still there,and PHP files are not accessed.
It means we want to allow any of text in place of "www" like..
abc.domain.com
xyz.domain.com
.......
*.domain.com
For this I do two things
1.- First I modified the DNS zone of domain.com to accept all *.domain.com requests with an A record of ***.**.***.**
(Your srv IP Address)
2.- Next, edited Apache's conf to accept *.domain.com
<VirtualHost ***.**.***.**:8 0>
DocumentRoot /var/www/vhosts/domain.com/httpdocs/
ServerName www.domain.com
ServerAlias *.domain.com
</VirtualHost>
NOw these all things are done perfactly,and my domain is allow me to write any thing in place of "www"
but when I write
anything.domain .com
it will sucessfully reach the site (Documentroot) and access the HTML files,
But PHP files are not acceses and Browser ask me to download the PHP files,
there is a message like "applicatio n/x-httpd-php"..
I also add
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
lines in Apache configuration files But my problem is still there,and PHP files are not accessed.