Reply To Thread
Results 1 to 2 of 2
  1. Collapse Details
    vhosts in apache 
    #1
    Junior Member
    Join Date
    Oct 2011
    Location
    Charleston, SC
    Posts
    7
    For the life of me! I can't get the vhosts to work in apache 2.2. I have them specified in the httpd.conf file directly is that what is messing them up?
    Reply With Quote
     

  2. Collapse Details
     
    #2
    Site Admin Webmaster's Avatar
    Join Date
    Oct 2011
    Location
    Orlando, FL
    Posts
    77
    No using them in httpd.conf is fine. You probably have the virtualhost part specified wrong. Here is one I use to do a redirect, notice the *:80 in the virtualhost tag:

    <VirtualHost *:80>
    ServerAdmin admin@domain.com
    ServerName domain.com
    ServerAlias *
    redirect permanent / https://www.domain2.com
    </VirtualHost>

    Make sure you are using the *:80 unless you need to specific a specific IP. Using a wildcard (the *) will help esucre it will work even if there is any NAT or firewalling you might be doing.
    Reply With Quote
     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts