How can I change url name?

Domain Name System (DNS): Can you change a local website url to anything.com on your network?

  • How can I change a local website like 192.168.1.100/~username/index.html to a custom url for people on my network (http://example.com) or something to that effect.

  • Answer:

    Are you using Apache? If you are, you can add a virtual host to your httpd.conf file. I'd suggest reading the docs for virtual hosts and how to configure Apache for it. It's pretty straight forward. Essentially, an Apache virtual host figures out which directory to pull files from based on the information in the HTTP host: header. Below is a snippet from my httpd.conf file. <VirtualHost *:80>     ServerAdmin     DocumentRoot /var/www/html/processor     ServerName processor     ErrorLog logs/processor-error_log     CustomLog logs/processor-access_log common </VirtualHost> These are all the fields you need. The first line says listen on any IP address and on port 80. ServerAdmin is used on any Apache error pages as contact. DocumentRoot is where the files are for the website. Each site has it's own DocumentRoot, normally ServerName is the hostname for this virtual host. ErrorLogs points to your custom error log file. One per virtual host. CustomLogs points to your access logs, one per host. Set all that up and restart your web server. If all goes well, you have a virtual host. But wait, there's more! You have to configure your DNS to point to your ServerName to your web server IP address. Do that however you configure your DNS. Or you can edit your .hosts file /etc/hosts on linux, %system%\system32\drivers\etc\hosts on Windows. You can have as many virtual hosts as you want. I am pretty sure you can do something similar in Windows. In fact, I think I have, but I don't recall how.

Mike Fratto at Quora Visit the source

Was this solution helpful to you?

Other answers

DNS record processor  IN CNAME real-namehttp://.dummy-host-example.com. The period after com is needed.

Alan Cohen

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.