On Fri, Jul 1, 2011 at 10:04 AM, Suresh Kumar <[email protected]> wrote:

.....................

>  i have created a vhost.conf in the path /etc/httpd/conf.d/vhost.conf.
>  here is the contents...
>
> NameVirtualHost *:80
>
> <virtualhost *:80>
>      ServerAdmin [email protected]
>      DocumentRoot /var/www/html/dev_setup/
>      ServerName dev_setup
>      ServerAlias www.dev_setup.com
>   </virtualhost>
>   <virtualhost *:80>
>      ServerAdmin [email protected]
>      DocumentRoot /var/www/html/cefpress.com/
>      ServerName  cefpress.com
>      ServerAlias cefpress.com
>   </virtualhost>
>   <virtualhost *:80>
>      ServerAdmin [email protected]
>      DocumentRoot /var/www/html/dev.bobstores.com/
>      ServerName dev.bobstores.com
>      ServerAlias dev.bobstores.com
>   </virtualhost>
>
>
> and the entries in the /etc/hosts file are ...
>
> 127.0.0.1 wks17.isinfotech.com wks17 localhost.localdomain localhost
> localhost4
> ::1 wks17.isinfotech.com wks17 localhost6.localdomain6 localhost6
> 127.0.0.1 localhost localhost
> 127.0.0.1 www.dev_setup.com dev_setup
> 127.0.0.1 www.cefpress.com cefpress.com
> 127.0.0.1 dev.bobstores.com   dev.bobstores.com
>
>
>
> Now i am able to view the virtual sites,  as
> http://dev_setup/
> http://cefpress.com
> http://dev.bobstores.com
>

"isinfotech.com", "cefpress.com" and "bobstores.com"   are legitimate
active domains.  Unless you or the company you work for, has been
contracted to do work for the owners of the said domains,   you should
avoid them.  Instead "example.{org,com,net}  can be used for such
purposes.

> but not able to view the sites which i create at /var/www/html/
>  for example
>  if create a new project at mobilesite at /var/www/html/mobilesite
>
> and try to access it as http://localhost/mobilesite/

I believe you need to define a **default**  virtual host which is missing - see:
<http://httpd.apache.org/docs/2.0/vhosts/examples.html>
<http://serverfault.com/questions/82306/apache-default-catch-all-virtual-host>

-- 
Arun Khan
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to