Setting up web sites on server.

Discussion in 'Apache' started by Montezuma45, Feb 3, 2011.

  1. #1
    I have a second server I recently setup (Gentoo) and tried to "copy" the setup for Apache from the old server. Unfortunately, that server was setup many years ago before the newest version of Apache and they don't act the same.

    I have static IP's and run the systems out of my house. I have my main site (www.cs-mn.com) which I intend to use for more of a family site with the sub areas (e.g., www.cs-mn.com/photos & www.cs-mn.com/???? ).

    I also have a business site which has its own domain name and a friend site that I'm running off my server for him.

    My first attempt at doing this has not produced the proper results and I'm ready to start from scratch if necessary.

    What is the proper way to lay this out. Bare in mind, I would eventually like to have one server be the backup to the other if one goes down without to much human intervention. I know this is not a simple answer.
     
    Montezuma45, Feb 3, 2011 IP
  2. moads

    moads Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #2
    Apache configurations usually look like this... You will obviously have to change your DocumentRoot folder to whatever it is on your computer locally (starting with "C:\" or whatever drive it resides on)

    <VirtualHost *:80>

    # Admin email, Server Name (domain name) and any aliases
    ServerAdmin
    ServerName yoursite.com
    ServerAlias www.yoursite.com


    # Index file and Document Root (where the public files are located)
    #DirectoryIndex index.html
    DocumentRoot /home/virtual/yoursite.com/public


    # Custom log file locations
    LogLevel warn
    ErrorLog /home/virtual/yoursite.com/log/error.log
    CustomLog /home/virtual/yoursite.com/log/access.log combined

    </VirtualHost>

    Are you trying to copy the entire Apache config file? What version? Copy/paste it here if you still need help.
     
    moads, Feb 3, 2011 IP
  3. Montezuma45

    Montezuma45 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No, I'm not trying to copy and paste. The old server was before Apache restructured the files and made the mods directory/sections (back when it was in one file). I was trying to copy what I thought was in the large file to the divided sections and got lost. LOL.

    At this point, I am starting fresh after receiving advice in the Gentoo forum which totally was different then what my son had setup 6+ years ago. Since the Gentoo forum is not an Apache help forum, I came here. Now I'm trying to learn the proper way it should be done and then I'll see about renovating the original server after it is working.
     
    Montezuma45, Feb 3, 2011 IP
  4. Montezuma45

    Montezuma45 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I guess I can't put the code in here yet. What is the deal with 10 post and 7 days?
     
    Montezuma45, Feb 4, 2011 IP
  5. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you are restricted untill then its just a policy they have to control spamming and such
     
    srisen2, Feb 8, 2011 IP