Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

setting virtual host and virtual IP to virtual network card

setting virtual host and virtual IP to virtual network card

 
Post new topic   Reply to topic     Forum Index -> Linux os
View previous topic :: View next topic  
Author Message
juniormember



Joined: 28 Jun 2008
Posts: 154

PostPosted: Tue Oct 07, 2008 6:39 am    Post subject: setting virtual host and virtual IP to virtual network card Reply with quote

Hi,

If you have web hosting plan and you have your server for testing. You need same cofiguration for web hosting plan and your personal.

You need then virtual host configuration in apache web server.
1. This needs you to setup virtual host entry instead of using localhost.
2. You need virtual IP that can be configure through virtual network card and can assign your favorite ip or simple adding through TCP/IP.
Easy way to install http://www.ntkernel.com/w&p.php?id=32 and download this virtNet driver. Assign IP TCP/IP through after installing like 192.168.1.3

or

Assigning multiple IPs through TCP/IP
Network Properties-> Internet Protocol (TCP/IP) --> properties--> Advanced --> IP Setting --> Add

Add your desired IP like 192.168.1.3 or many

Ping this IP to test If working fine

3. Make entries in hosts file c:\winnt\system32\drivers\etc
or linux can be /etc/hosts
Open this hosts file in any text editor

Code:
192.168.1.3 domain1
192.168.1.3 domain2
192.168.1.3 domain3
192.168.1.3 domain4
192.168.1.3 sub.domain3


save this file

Ping this domains in command prompt

Quote:
ping domain1


If pinging successfully its resolving domain entries

Open apache/config/httpd.conf in any text editor

Code:
NameVirtualHost 192.168.1.3

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost 192.168.1.3>
    DocumentRoot "C:\Apache Group\Apache2\htdocs\directory1\domain1"
    ServerName domain1
    ErrorLog logs/domain1.error_log
    CustomLog logs/domain1.com-access_log common
</VirtualHost>


Check in browser after restart of apache web server

http://domain1/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Linux os All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack