Apache 2.2 stays local with document root, external is stuck.

Discussion in 'Apache' started by tynelson, Dec 9, 2009.

  1. #1
    First and foremost, thank you SO much if you can help me.

    I'm a Web Designer that took on a dedicated server job, and I am somewhat familiar with freebsd and how to run commands and navigate appropriately, but I'm having a problem with Apache. I will admit my ignorance to some things, mostly lexicon in this field. Servername, Hostname, Domain, name based...those things can throw me for a loop...

    I can access everything within my own network at home, but when I try and access it outside of my home (external), all that shows up is the default Apache page that says "it works."

    I've attached what I believe are the relative documents.
    httpd.conf
    httpd-vhosts
    hosts
    rc.conf

    When I go to 66.181.24.10 in my browser...I can see the web pages I put on the server, and even navigate through my mailman admin pages...but when the site is accessed outside of my home network..that darn default "It Works" page comes up. I realize that since that "it works" page does come up, it appears that the world CAN access my server, and that perhaps I have the root different for the external than I do the local. I don't know how I could have done that. This has taken me over 2 weeks now, and I will do anything to get this fixed.

    I would be so thankful for any help.

    Best,
    -Tyler
     

    Attached Files:

    tynelson, Dec 9, 2009 IP
  2. beastserv

    beastserv Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you simply need to create a virtual host for your domain name.

    as example:

    
    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot /www/docs/dummy-host.example.com
        ServerName dummy-host.example.com
        ErrorLog logs/dummy-host.example.com-error_log
        CustomLog logs/dummy-host.example.com-access_log common
    </VirtualHost>
    
    Code (markup):
    <VirtualHost *:80> -- > insted of * you can put your EXTERNAL ip address( dedicated IP for this website )

    ServerAdmin - your email!

    documentroot - where are your html files will be stored? ( path )
    ServerName : www.yourdomain.com

    path to logs ( you might want to put them in their own directory, so later u can use them for statistics and such )


    hope this helps you a bit , apache is pretty simple and easy to use, after you get the idea of how the config file looks like.

    a great source for documents with examples can be found here : http://httpd.apache.org/docs/2.2/
     
    beastserv, Dec 11, 2009 IP