Solved

Provide valid name instead of localhost in apache 2.2

Posted on 2013-05-29
2
407 Views
Last Modified: 2013-06-04
Hi,

I need to provide a logical name to the site in apache

in the httpd.conf file i have added the virtual host

<VirtualHost *:80>
    DocumentRoot "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\example1"
    ServerName www.textexample123.com
 
    # Other directives here
</VirtualHost>


and when i try to execute the site with the name " www.textexample123.com" it goes to the internet for searching the url instead it should point to the project i am running.

Is there any other modification i need to make  in the file.
httpd.txt
0
Comment
Question by:Rocking
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
DOSLover earned 180 total points
ID: 39205526
As per apache documentation (http://httpd.apache.org/docs/current/vhosts/name-based.html), " ... Of course, you can't just make up names and place them in ServerName or ServerAlias. You must first have your DNS server properly configured to map those names to an IP address associated with your server."

Are you testing this on the local server? Probably using proxy might help what you are trying to.
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 95 total points
ID: 39205559
You can also put it in your 'hosts' file (/etc/hosts).
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question