2 Replies - 3128 Views - Last Post: 26 November 2009 - 09:16 AM

#1 ethereal1m   User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 227
  • Joined: 30-June 09

serveralias directive in Apache

Post icon  Posted 25 November 2009 - 10:56 PM

hi all,
I have a problem setting an alias to my local machine. Suppose my machine named 'candle'. And I want to set an alias 'fire' to it. In my httpd.conf:
# Main server configuration
NameVirtualHost *:80

# VirtualHost block
<VirtualHost *:80>
ServerName candle
ServerAlias fire
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2"
</VirtualHost> 

# Global serverName that matches virtualHost serverName
ServerName candle



This works when I enter the following address to browser:
http://candle/


but it doesn't work when I enter:
http://fire/



What do I miss?

Thanks in advance

Is This A Good Question/Topic? 0
  • +

Replies To: serveralias directive in Apache

#2 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6820
  • View blog
  • Posts: 31,436
  • Joined: 10-May 07

Re: serveralias directive in Apache

Posted 26 November 2009 - 08:13 AM

I've not seen that handled by Apache. If you want to visit your website via a name, place that name in your hosts file.

C:\window\system32\drivers\etc\hosts

Then you can ping the name, make sure it resolves with nslookup, & then you can visit the site with your web browser.
Was This Post Helpful? 1
  • +
  • -

#3 ethereal1m   User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 227
  • Joined: 30-June 09

Re: serveralias directive in Apache

Posted 26 November 2009 - 09:16 AM

Bam! works like a charm! :) :^: thx!

This post has been edited by ethereal1m: 26 November 2009 - 09:17 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1