Thursday, September 28, 2017

Not working when /var/www/html/index.html in CentOS

Basically when you are enable virtual hosting should've note some points as follows

If the sub domain page should be in a directory or folder, it wouldn't work when you put a single page instead of folder or directory

#vi /etc/httpd/conf/httpd.conf
.
.
.
<VirtualHost *:80>
    ServerAdmin admin mail id
    DocumentRoot /var/www/html/app3
    ServerName app3.example.in
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

For example
not work when
DocumentRoot /var/www/html/index.html
work when
DocumentRoot /var/www/html/app3
//if index.html should be placed in app3 folder it would be work

No comments:

Post a Comment