SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apache httpd.conf help answer a question please.

    I would be ashamed to admit how much time I have wasted on this "simple" issue.


    I was able to install a SSL cert and get it working with no browser warnings, but I can't even use tutorials to figure this basic problem out:


    Code:
    <VirtualHost 101.9.xx.50:80>
    DocumentRoot "/var/www/html/domain.com"
    ServerName www.domain.com
    ServerAlias domain.com *.domain.com
    <Directory "/var/www/html/domain.com">
    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>
    Result: http://www.domain.com/[/url] does not work at all:
    "Server not found"

    Code:
    <VirtualHost domain2.com:80>
    DocumentRoot "/var/www/html/domain2.com"
    ServerName domain2.com
    ServerAlias www.domain2.com *.domain2.com
    <Directory "/var/www/html/domain2.com">
    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>
    http://www.domain2.com/[/url] does not work at all:
    "Server not found"

    Code:
    <VirtualHost *:80>
    DocumentRoot "/var/www/html/domain3.com"
    ServerName domain3.com:80
    ServerAlias www.domain3.com *.domain3.com
    </VirtualHost>
    http://www.domain3.com/[/url] does not work at all:
    "Server not found"


    Code:
    <VirtualHost domain4.com:80>
    DocumentRoot "/var/www/html/domain4.com"
    ServerName domain4.com:80
    ServerAlias www.domain4.com *.domain4.com
    </VirtualHost>
    http://www.domain4.com/[/url] does not work at all:
    "Server not found"

    I could post 15 more variations and none of them work...
    This cannot possibly be so hard, what am I doing wrong?
    Thank you.

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^^^
    EDIT:
    No longer getting any errors when restarting Apache and www.domain.com still doesn't work.

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    g181,

    What you failed to say is whether this is on your own test server or online. If the former, you should NOT be using a valid domain name as your computer SHOULD interpret any request for that as wanting the ONLINE (hosted) version as you've NOT changed your hosts file (at least that's not evident by your post). If not (localhost), then have a look at your DNS as that needs to have both the www'd version and non-www version to work with both.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by dklynn View Post
    g181,
    ...your own test server or online....
    Online with a newer VPS / My older VPS has Direct Admin; This time I'm learning to do things without a crutch.
    (Now no longer wondering why the Apache "virtual host" tutorials were not fixing the issue)

    Quote Originally Posted by dklynn View Post
    g181,
    ...then have a look at your DNS as that needs to have both the www'd version and non-www version to work with both.
    Exactly
    You were 100&#37; correct, thank you so much dk.

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    g181,

    Whew! I'd have to go look at my DNS settings if you hadn't resolved that on your own!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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