Hello Friends,

I am using Fedora 14 (LAMP) setup  (php)

i have been using virtual host setup for various project in my system.
currently i am using different .conf files(httpd.conf) for each of the
projects..
basically what i am trying to set up is that, i download the project files &
database from the live server and make a local setup in my machine
so for each of the projects i have set up a virtual host in my local machine
with the same url as the live server

*for example: if i have to work in http://dev.project1.com  *

then i carry out the following steps

*Step 1*
======
mv httpd.conf httpd_normal.conf
mv httpd_project1.conf httpd.conf

virtual host setting for project1 in httpd_project1.conf

<VirtualHost *:80>
ServerName cefpress.com
DocumentRoot /var/www/html/dev.project1.com
</VirtualHost>

( access url from my localhost - http://dev.project1.com )


*Step 2*
======

edit my /etc/hosts  file, uncomment the corresponding project path

127.0.0.1 wks17.isinfotech.com wks17 localhost.localdomain localhost
localhost4
::1 wks17.isinfotech.com wks17 localhost6.localdomain6 localhost6
#127.0.0.1 dev.project1.com dev.project1.com -(in this case uncomment this
line )
#127.0.0.1 project2.com project2.com
#127.0.0.1 project3.com                   localhost

*Step 3*
======

restart the appahe server

/etc/init.d/httpd restart
=====================================================================================================
my config files in /etc/httpd/conf/ are

-rw-r--r-- 1 root root 34631 Mar 28 20:13 httpd_project1.conf
-rw-r--r-- 1 root root 34698 May 24 22:01 httpd_project2.conf
-rw-r--r-- 1 root root 34417 May 24 22:01 httpd_normal.conf
-rw-r--r-- 1 root root 34629 Apr  7 18:10 httpd_project3.conf

---------------------------------------------------------------------------------------
virtual host setting for project1 in httpd_project2.conf
<VirtualHost *:80>
ServerName cefpress.com
DocumentRoot /var/www/html/project2.com
</VirtualHost>

access url from my localhost - http://project2.com
---------------------------------------------------------------------------------------

virtual host setting for project1 in httpd_project3.conf

<VirtualHost *:80>
ServerName cefpress.com
DocumentRoot /var/www/html/project3.com
</VirtualHost>

access url from my localhost - http://project3.com
---------------------------------------------------------------------------------------

Is there a way where i can work on with my projects setups in localhost with
executing the above 3 steps.?

Hope i am clear with my problem, please let me know if any
other information is required.

-- 
~ J Suresh Kumar
  95000 90432
http://myrakshana.info/blog/
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to