Find the answer to your Linux question:
Results 1 to 10 of 10
lol...thought I was doing good making my own webserver. Got the parts, built the comp, grabbed centos and installed it... then....i realized i had no idea of the next steps.. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    69

    Installation not so bad, but now what?


    lol...thought I was doing good making my own webserver.

    Got the parts, built the comp, grabbed centos and installed it...

    then....i realized i had no idea of the next steps..

    but I am working on it.

    I set up a partition for the 'home' directory as every tutorial in existence talked about it being a good thing....

    but unfortunately, the html directory is not in home...it is in var/www/html...

    so basically for a webserver, I do not see why home would be a partition...i think html might be better..

    more research.....dang it...not one mention about that difference so far on any tutorial.

  2. #2
    Just Joined!
    Join Date
    Mar 2008
    Location
    Canada
    Posts
    42
    >but unfortunately, the html directory is not in home...it is in var/www/html
    That's the default for just about every Linux distribution I've used. Two things you may want to think about, however. /var holds, as you discovered, your webserver data. It also holds a lot of other things, namely logs and mail spools. It's recommended that on servers you make /var a separate partition, especially considering the size the logs can take up over time.

    The other thing is that Apache is fairly simple to configure. If you want to store your website in /home/www, go ahead. I'd recommend making a symlink to it from /var/www, perhaps something like /var/www/my-site, which points to /home/www/my-site. Editing the Apache configuration is fairly easy, it's usually located somewhere around a file named /etc/apache2/httpd.conf (location can vary -- also, on many systems it's now linked from a separate folder called sites-available).

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    69
    Quote Originally Posted by John A View Post
    >but unfortunately, the html directory is not in home...it is in var/www/html
    That's the default for just about every Linux distribution I've used. Two things you may want to think about, however. /var holds, as you discovered, your webserver data. It also holds a lot of other things, namely logs and mail spools. It's recommended that on servers you make /var a separate partition, especially considering the size the logs can take up over time.

    Yea..and the disk druid thing did not give me an option to make 'html' a separate partition, so I used home as EVERYONE said to do on the internet..lol

    The other thing is that Apache is fairly simple to configure. If you want to store your website in /home/www, go ahead. I'd recommend making a symlink to it from /var/www, perhaps something like /var/www/my-site, which points to /home/www/my-site. Editing the Apache configuration is fairly easy, it's usually located somewhere around a file named /etc/apache2/httpd.conf (location can vary -- also, on many systems it's now linked from a separate folder called sites-available).
    I have been reading online a lot about this and some people go for symlink and some just adjust the two spots in the conf file (for latest apache).

    Changing the docroot would seem easiest but I do not know any 'cons' to that. Symlinks seem like a lot of work and 'todo' just to change move everything over and they have listed a few cons abou tit online..

    well..they never said it would be easy.

    I think I just got an idea for a tech manual that does not exist .... 'how to build a webserver using linux, apache, mysql, and php: from install to go live'

    all the books I have spend so much time on network server stuff like samba and make dns entirely confusing assuming you are gonna be part of some big network and not just a webserver...

    ugh...

    so hard the first time you do anything...

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Check out this link: Tutorial: Build a cheap LAMP server on CentOS 4.3, it deals specifically with setting up a server with centOS. Some of it won't apply to what you want but it talks about apache2 and mysql. You might try search 'LAMP tutorials' for Linux, Apache, Mysql, php. Also, in your home directory there is 'public_html' directory which you can use for your web server if you don't want to use the /var/www/ directory.

  5. #5
    Just Joined!
    Join Date
    Mar 2008
    Posts
    69
    Quote Originally Posted by yancek View Post
    Check out this link: Tutorial: Build a cheap LAMP server on CentOS 4.3, it deals specifically with setting up a server with centOS. Some of it won't apply to what you want but it talks about apache2 and mysql. You might try search 'LAMP tutorials' for Linux, Apache, Mysql, php. Also, in your home directory there is 'public_html' directory which you can use for your web server if you don't want to use the /var/www/ directory.
    Thanks so much..I am reading that one right now.

    I think we are seeing the end of search engines usefulness with the 100 billion web pages out there, many that are just too old or scams that you have a hard time finding anything.

    I have heard rumor about a change in how they are going to be used in the next few years, and I cannot wait...google-ing is becoming a chore, especially in this area since the words "web server linux" cover about 2000 different topics and most are inter connected...lol

    I think I am going to change the conf file to documentroot apache somewhere else and then deal with this selinux issue that it will result in.

  6. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Glad to help. Hope it works for you.

  7. #7
    Just Joined!
    Join Date
    Mar 2008
    Posts
    69
    Quote Originally Posted by yancek View Post
    Glad to help. Hope it works for you.
    well... I found that apache is working fine in the directory it wants.

    The issue appears to be the virtualhost/nameserver setup. I know I got it right as the permission page no longer comes up but instead goes to a page not found instead.

    After reading (endlessly) online, I think I figured out that you cannot server html pages througha virtual host unless they specifically can be properly looked up in DNS.

    SO, to test it at home before adding to a gateway, the problem lies in making the server see a dns record for the websites and then it should be fine.

    Exactly how you would do that is my research topic today.

    To make apache go to the home directory just involves changing docroot in the virtualhost directive. You can leave the regular docroot as is and ignore the whole basedir thing (assuming you are trying to build a webserver.)

    The issue lies on how to access these virtual sites from a second computer, not as part of a network, but coming in port 80 as the internet user usually would.

    so...things are working and new things need to be done..wheee

    time to try to trick bind into working right for me...

  8. #8
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,601
    As you specifically mention google....

    Try this URL instead <Linux> - Google Search

    It limits results to linux related...

    Quote Originally Posted by centuser1
    After reading (endlessly) online, I think I figured out that you cannot server html pages througha virtual host unless they specifically can be properly looked up in DNS.
    Say rather that it needs to be found by name, usually by DNS but
    in a small test environment, you can also use your hosts file.

    On a hosted server for a proper domain you would set the domain
    up to be pointed to be pointed at by DNS servers. What servers
    are specified on the domain management area.

    You can set up your own DNS server using bind which is the
    standard one. Again it is relatively simple to set up using a couple
    of text files.

    Anyway, this is a how-to that allegedly gives the perfect CentOS
    server. The Ubuntu one was worth while reading. Linky
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  9. #9
    Just Joined!
    Join Date
    Mar 2008
    Posts
    69
    Quote Originally Posted by elija View Post
    As you specifically mention google....

    Try this URL instead <Linux> - Google Search

    It limits results to linux related...



    Say rather that it needs to be found by name, usually by DNS but
    in a small test environment, you can also use your hosts file.

    On a hosted server for a proper domain you would set the domain
    up to be pointed to be pointed at by DNS servers. What servers
    are specified on the domain management area.

    You can set up your own DNS server using bind which is the
    standard one. Again it is relatively simple to set up using a couple
    of text files.

    Anyway, this is a how-to that allegedly gives the perfect CentOS
    server. The Ubuntu one was worth while reading. Linky
    lol..I read that 'perfect one'...it gave me the order of things I might do as in setting up, but like every other one, the 'gloss over' of apache is quite obvious.

    Looks like i need to write one.

    I think I, like many, are going to build a standalone webserver and set it up at home. Once it is working, install the server in a datacenter.

    Of course then one must deal with how to properly test everything including your nameserver set up using the dsl and belkin router to access webpages and stuff.

    then when one installs in the datacenter, you have to deal with..welll, I do not know yet..but I would assume

    1- dealing with the ip of your server and eth card as relating to the ips the datacenter gives you
    2- rewriting the dns namesserver to deal with the ips the center gives you
    3- adjusting somethings in httpdconf to deal with the virtual name and ip based with the new ips...

    then I assume it should work.

    Unfortunately... no good how tos are out there yet..

    when I finsih mine, I will link to it...lol

    a start

  10. #10
    Just Joined!
    Join Date
    Mar 2008
    Posts
    69
    whew, what a long 3 weeks of doing this.
    With all the notes and how tos I have had to write for myself I realize I should just write a how to book..how to build and manage a web server.

    wow...

    for those who are watching...

    found someone to help with the dns, although I have 3 books arriving tomorrow on BIND.

    Not using a control panel is difficult only due to no info out there on setting up virtual hosts (most use a managed service or a control panel).

    However, I think by end next week it should be up.

    My next step after the nameserver is to make apache deal with ip, name, and test sites correctly.
    Add users with 'jailed' accounts allowing only access via shell and ftp to their /home/user folder (where the html folder is located too.)
    setting up mail (yuck, is that gonna be fun)
    adding disk quotas per user and per function (mail, web, etc)
    add the same user to mysql and give hem a database.
    Deal with ssquirrellmail as part of the user set up.

    and that should be about that...just a little det up on php and some more advanced apache stuff and it should be good for go.

    And then learning to add ssL to it, CA and all.

    Gonna install and use mrtg and some other cool things.

    Need to find a way to be alerted if drives, cpu, memory, etc fail..like asap!

    and then on to programming.

    Will put it all on my project page for anyone needing to set up a server...and anyone who wants to impart info, you are very welcome to do that.

Posting Permissions

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