[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

Apache virtual domains, can only have www and not http? what am I doing wrong?

Hi all

Having a weird apache problem, where one of my websites can only work in www format, and not http:// as well.

lets say my domain is happychappy.com.

if I do www.happychappy.com apache sends that user where the files are, talking virtual domains here.

If that user does http://happychappy.com, they get the default server webpage and nothing to do with what I want.

i know its something in the apache config, if I change the virtual domain in there, I mean the "ServerName"
to www.happychappy.com or just happychappy.com, either or will work.

But ofcourse I want both to work, to not complecate my users and have problems

Hope someone can help

Cheers
0
thechase22
Asked:
thechase22
  • 3
  • 2
1 Solution
 
hernst42Commented:
Use:

        ServerName happychappy.com.
        ServerAlias *.happychappy.com
0
 
thechase22Author Commented:
I havent used serveralias for any of my configs, an its not by default, this is strange?
0
 
thechase22Author Commented:
can you explain what the . is after the *

Bit weird that
0
 
hernst42Commented:
0
 
thechase22Author Commented:
Well thank you very much for your quick responsive help my kind sir, EE was the winner over google this time :)
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now