-
10-31-2011 09:32 PM
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?
-
Site Admin
11-03-2011 02:09 PM
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules