Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 24
Hello All, Im quite the noob, and im trying to build my own server to host some websites of mine (to avoid the cost of hosting). I have Apache and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Byroman's Avatar
    Join Date
    Mar 2006
    Location
    St. George, Ontairo, Canada
    Posts
    38

    Exclamation Using Multiple Domains On Same Server Using The Same IP


    Hello All,
    Im quite the noob, and im trying to build my own server to host some websites of mine (to avoid the cost of hosting). I have Apache and MySQL sucessfully installed on my machine (Running Fedora Core 4), and I have one domain sucessfully running. But im trying to host multiple websites (4 to be exact) all with different domains. I have a dynamic IP adress and I use DynDNS, so I need to do this using the same IP adress. I read this article and folowed all the steps exactly, but it did'nt work. Could any one walk me through how to do this, or point me to another article that should work better for me?
    Thanks alot,
    Byroman
    :drown:

  2. #2
    Just Joined! Byroman's Avatar
    Join Date
    Mar 2006
    Location
    St. George, Ontairo, Canada
    Posts
    38

    Any Ideas?

    Any body have any ideas on how to do this? I really need to get this working.
    Any help would b greatly apreciated.
    Byroman

  3. #3
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    so how do you have it setup.

    # Virtual host Virtual Host 1

    <VirtualHost 1.2.3.4>

    DocumentRoot /var/www/html/folder1
    ServerAdmin webmaster@bigfeet.org

    ServerName www.fake.com

    DirectoryIndex index.html index.html index.htm index.shtml

    ErrorDocument 404 "http://bigfeet.org/missing.html"

    </VirtualHost>

    # Virtual host Virtual Host 2

    <VirtualHost 1.2.3.4>

    DocumentRoot /var/www/html/folder2

    ServerAdmin webmaster@smellycarpet.com

    ServerName www.fake2.com

    DirectoryIndex index.html index.html index.htm index.shtml

    ErrorDocument 404 "http://smellycarpet.com/missing.html"

    </VirtualHost>


    does your ip match whats listed in your conf file and do the different folders exist like above with matching web urls?

    also, do you have your private ip (ie 192.....) or your public ip listed in the conf file

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! Byroman's Avatar
    Join Date
    Mar 2006
    Location
    St. George, Ontairo, Canada
    Posts
    38

    Thanks for the reply

    Thanks for the reply.
    Heres what the virtualhost part of my conf file look like:
    Code:
    #
    # Virtual hosts
    #
    
    # Virtual host byroman.homelinux.org
    <VirtualHost *>
    DirectoryIndex index.php index.html index.htm index.shtml
    LogLevel debug
    HostNameLookups off
    </VirtualHost>
    # Virtual host byroman.homelinux.com
    <VirtualHost byroman.homelinux.com>
    DocumentRoot /home/byroman/Websites/byroman.homelinux.com
    ServerAdmin byroman@gmail.com
    ServerName byroman.homelinux.com
    DirectoryIndex index.html index.html index.htm index.shtml
    </VirtualHost>
    Is this right? The two domains are byroman.homelinux.org and byroman.homelinux.com. (This is just temporary untill i get this working and Im ready to use my real domains). Both are free domains from DynDNS. I use DynDNS since I have a dynamic IP adress and I dont have a static IP adress. When I go to byroman.homelinux.org, it works, but byroman.homelinux.com will not.
    Any help would be greatly apreciated.
    Thanks a lot,
    Byroman

  6. #5
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    from your linked article above (and from how I have set it up before) it should look similar to this
    Code:
    NameVirtualHost 12.34.56.78
    
    # Virtual host Virtual Host 1
    
    <VirtualHost 12.34.56.78>
    
    DocumentRoot /home/byroman/Websites/byroman.homelinux.org
    
    ServerAdmin webmaster@bigfeet.org
    
    ServerName byroman.homelinux.org
    
    DirectoryIndex index.html index.html index.htm index.shtml
    
    ErrorDocument 404 "http://bigfeet.org/missing.html"
    
    </VirtualHost>
    
    # Virtual host Virtual Host 2
    
    <VirtualHost 12.34.56.78>
    
    DocumentRoot /home/byroman/Websites/byroman.homelinux.com
    
    ServerAdmin webmaster@smellycarpet.com
    
    ServerName byroman.homelinux.com
    
    DirectoryIndex index.html index.html index.htm index.shtml
    
    ErrorDocument 404 "http://smellycarpet.com/missing.html"
    
    </VirtualHost>
    and where you see 12.34.56.78 you could try and use the machine ip or just *

    here is a better article on the setup
    http://httpd.apache.org/docs/1.3/vhosts/name-based.html

  7. #6
    Just Joined! Byroman's Avatar
    Join Date
    Mar 2006
    Location
    St. George, Ontairo, Canada
    Posts
    38

    Hello

    Hello,
    Thanks for the reply. Ive replaced the virtual host section with what you posted and edited the fields that needed to be. But now what I go to start the httpd process, I get this error message:
    Code:
    Starting httpd: (99)Cannot assign requested address: make_sock: could not bind to address 72.57.170.113:80
    no listening sockets available, shutting down
    Unable to open logs
                                                               [FAILED]
    Any ideas about this? At the end of your post, you said to replace the IP adress with the machine IP. By this do you mean my public IP or the non-routable IP of my machine?
    Thanks a lot,
    Byroman

  8. #7
    Just Joined! Byroman's Avatar
    Join Date
    Mar 2006
    Location
    St. George, Ontairo, Canada
    Posts
    38

    Also...

    Also,
    I tried replacing the IP adress with a *, and when i did that and tried starting httpd, i got this error:
    Code:
    Starting httpd: [Sat Apr 01 20:32:00 2006] [warn] NameVirtualHost 192.168.0.104:0 has no VirtualHosts
    (99)Cannot assign requested address: make_sock: could not bind to address 72.57.170.113:80
    no listening sockets available, shutting down
    Unable to open logs
                                                               [FAILED]
    Thanks for the help,
    Byroman

  9. #8
    Just Joined! Byroman's Avatar
    Join Date
    Mar 2006
    Location
    St. George, Ontairo, Canada
    Posts
    38
    Any ideas? Now Apache is not working at all, so I really need to get this woring again.
    Thanks a lot,
    Byroman

  10. #9
    Just Joined!
    Join Date
    Apr 2005
    Posts
    88

    Apache Not Working

    Greetings,

    I would suggest you to comment everything and first check whether the Apache works with the default configuration and check which is the default website it is reffering to. As, what I think, the problem is with the IP Address being changed and the apache is not able to keep track of it.

    Also, you can replace the IP Address with * if you have specified any IP Address for the Listen Directive. Maybe you need to install a DynDNS client. In order to do so please refer to the following link:
    http://www.linuxhomenetworking.com/w..._:_Dynamic_DNS

    I wud suggest u to start from the scratch and perform the things step by step instead of doing all the configuration together.

    Also, check whether the port 80 or the port at which apache is running is accessible or not.

    Regards

  11. #10
    Just Joined! Byroman's Avatar
    Join Date
    Mar 2006
    Location
    St. George, Ontairo, Canada
    Posts
    38
    Hello!
    Thanks for the reply. I will start from scratch some time tonight, and will update you on what happens.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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