Click here to Skip to main content
15,883,828 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I wrote httpd.conf file this way but it's not working for me.

<virtualhost *:80="">

DocumentRoot "/var/www/html/"
ServerName dev.test.com
ServerAlias www.dev.test.com
</VirtualHost>


what am I doing wrong here. Please help

What I have tried:

<virtualhost *:80="">

DocumentRoot "/var/www/html/"
ServerName dev.test.com
ServerAlias www.dev.test.com
Posted
Updated 14-Sep-21 20:52pm
v3

1 solution

It may be that you need a closing </virtualhost> tag as described at core - Apache HTTP Server Version 2.4[^].

However, since you provided no details about the actual problem, I am guessing here.
 
Share this answer
 
Comments
Member 14362033 15-Sep-21 2:54am    
Sorry, I forgot to add the ending tag of the virtual host.but when I am trying to load the application from browser it says this site can't be reached
Richard MacCutchan 15-Sep-21 3:49am    
That suggests that your website name does not have a DNS entry anywhere. You may need to add it to your /etc/hosts file.
Member 14362033 15-Sep-21 15:40pm    
yes. DNS wasn't mapped with ip address.It's solved now

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900