Question

My Create Virtual Host Doesn't Work

I have followed the detailed instructions on How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS . When I go to example.com I get - Example Domain

This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.

When I go to test.com - a website comes up for test.com

I can’t figure out why the html PAGES ON Apache2 will not show. I have created the HTML pages.

I am running Ubuntu 14.04 LTS and Apache2 Server

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I have follow all steps and create virtual directory then when run file given error all contents encoding format. how to solve this issue in Ubuntu. Example link

]( http://example.com/test1.html)

output:‹;RTA¯Ó0 ¾ïW˜ri]÷€S×V @âàÂ1kÜÕZ“”$í6¡÷ßqÛ½®åí@+µŽþlÇIžI“ûsPzUe‹äñ‡Bf à’ñä+Ì>Ÿ„ª+„OF ÒI4hÃ…^@^ ëЧAã‹p@”MŒ¥÷uˆ¿jÓà£Ñµ»°äÃ* <ž|ԅߎP·´P˜-á±6ÖOü$}™Jl)Ç°_,4yUèrQazw…rþÌÉt .sç‚Á¶3ò z±_Šü°·¦Ñ2ÌMel Ï‹5¿¯¶ã%ìžt 뫪R’ÞÏt3 ¡¨:Ç|¯Qá]°„à V-zÊ|ÃY3*–ðÁrKp¼5th©¸"öÂCÿ•ÔNH÷éÇðv½®OOyÞ£ÑxsƒîýÌáVîÅ$þÎX‰6´BRãb¸CµPqEú°äKŽ<Ê ÁG¸×›7›Í±ëE(17Vx2ÌUSÐ÷ % x¡Ä)¼dù®Ëòå´eóþO&£4/䤘óŠÍú~ÃöOiÖsëXï±dWÃ7‰ú#šuò"‰†y$]j<žLòrË»'£ÉªÁVg?Kr {=°„΋]E®ä^x;„ƱX TUó]Õ[Ï{çâs+øeÎùÜ9gäáà]ÐõÕëH¾4‡Ú#ç†KAºï’ðZ¸§Þ­Ñ*rŽ «$ªGÖ ß‹4èn8ŠŽÇ㊄+c÷ÑÏE—hAöÕXäðŒ§ú«ƒ‰¬L¢¾RIt©[4\o•ª‹ö

Thanks everyone for helping. I went over all my files to make everything was spelled correct and in the right file. I finally got it to work using 127.0.0.1 URL

Hi!

example.com and test.com should be replaced by the domain names that you actaully own and use. In the tutorial “How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS,” everything highlighted in red is meant to be replaced.