Answer the question
In order to leave comments, you need to log in
Trying to get to the virtual host directory from the network, but I get to /var/www/html ?
I installed apache on CentOS 7 and decided to set up virtual hosts
at the end of the /etc/httpd/conf/httpd.conf file added the following lines:
<VirtualHost 127.0.1.1:80>
ServerName test.com
DocumentRoot /home/test.com
ServerAlias www.test.com
<Directory /home/test.com>
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/test.com/logs/error.log
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Wangyu, remove the default config from conf.d. - this is so as not to fall into default, well, transfer the virtualhost to all IPs, and not just to the localhost.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question