PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

[FIXED] How to configure the Apache Sever in ubuntu to run sites locally?

 September 21, 2022     apache, ubuntu, virtualhost     No comments   

Issue

I am new to Apache and I want to configure example.com remotely. I do not own that domain. I tried this https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts but it didn't work. Can someone tell me what should be the contents of my example.conf file so that example.com and www.example.com both should point at my localhost. thanks


Solution

Add this entry in your /etc/hosts file

127.0.0.1 example.com
127.0.0.1 www.example.com

Then try to hit the URL from the Browser.



Answered By - shahin
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing