LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-20-2003, 09:10 AM   #1
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Rep: Reputation: 30
Apache questions


Hi all,

I am taking a class on DHTML and building my first websites. I want to run a web server from my personal server (RH 8). How can I set this up? I'm assuming I should run Apache? Where can I get an RPM package for it? After I install Apache (assuming that's what to use), how do I get the web server running? Then, how do I put the website on the server for all to see on the web? I'm a real when it comes to all this as I have NO experience in running a web server or building a website. The website stuff I will learn from this class, but hosting the site is completely foreign territory! Can anyone help me out? Thanks a million!

Chris
 
Old 05-20-2003, 09:43 AM   #2
antaydos
LQ Newbie
 
Registered: May 2003
Location: New England
Distribution: Red Hat 9
Posts: 15

Rep: Reputation: 0
Red Hat comes with Apache. Throw one of the cd's in, and when the package manager comes up, go to webserver tools (or something like that, I don't really remember exactly), and select Apache. It'll then install it. To get it to run, go to your Service Configuration, and make sure httpd is checked. Click on the "start" button, and the "save" button. This way, Apache will be started everytime you boot. The default location for all your web files is on /var/www
 
Old 05-20-2003, 12:37 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
You can download from:
ftp://rpmfind.net/linux/redhat/updat...-11.3.i386.rpm

Depending on the size of your var partition you may want to change it to home. You can do that by editing the DocumentRoot directive:
/etc/httpd/conf/httpd.conf

You can start apache (httpd) with:
service httpd start

If you want it to run on startup:
chkconfig httpd on
 
Old 05-20-2003, 01:12 PM   #4
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Ok, great!

Thanks guys. Now, once I have it running, how do I host websites from it? Thanks!

Chris
 
Old 05-20-2003, 01:16 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
Quote:
Originally posted by cjwsb
Thanks guys. Now, once I have it running, how do I host websites from it? Thanks!
Not quite sure what you mean by that.

Once you have apache (httpd) running and you have files in your DocumentRoot then you should be able to access:
http://your.ip.add.ress/

If you can't then check your firewall settings are allowing connections to port 80.
 
Old 05-20-2003, 01:17 PM   #6
antaydos
LQ Newbie
 
Registered: May 2003
Location: New England
Distribution: Red Hat 9
Posts: 15

Rep: Reputation: 0
well you've gotta register a domain name, and then you've also gotta set up a dns server so that the domain points to your ip address... i think. i'm not too sure about that, it's not my forte.
 
Old 05-20-2003, 08:41 PM   #7
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
I have a domain and my DNS server is running. Basically, what I mean is this:

I get Apache running, and I create a web page file, let's call it "my_homepage.html"

Where do I put that file?

Isn't that how it works, create an html file and put it somewhere on the webserver so it's a web page when people on the web connect to it?

I know that might sound dumb, but like I said, this is totally foreign territory! Thanks for the help so far!

Chris
 
Old 05-20-2003, 09:56 PM   #8
serz
Member
 
Registered: Apr 2003
Location: Buenos Aires, Argentina
Distribution: Slackware, Gentoo
Posts: 397

Rep: Reputation: 30
You have to put the files you want to host under /var/www/html directory. At least, that's the dir for Redhat.

So it would be: http://localhost/your_page.html
 
Old 05-21-2003, 03:40 AM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
If you make the file called index.html it will be accessed by default when you connect to:
http://www.yourhost.com/

The default files are listed in the DirectoryIndex directive in the httpd.conf file.
 
Old 05-21-2003, 12:44 PM   #10
WorldBuilder
Member
 
Registered: Mar 2003
Location: Massachusetts, USA
Distribution: RH 8, Solaris, Windoze eXPunged
Posts: 520

Original Poster
Rep: Reputation: 30
Thanks guys!

I am going to work on this over the next few weeks and will post a new thread in the future if I have any more question! Again, thanks!

Chris
 
Old 05-21-2003, 01:29 PM   #11
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
Quote:
Originally posted by cjwsb
I am going to work on this over the next few weeks
WEEKS!

If you run into problems then post sooner than that - apache is a dodle to set up and shoud more or less work "out of the box".
 
Old 05-22-2003, 04:00 AM   #12
david63
LQ Newbie
 
Registered: May 2003
Location: Lancashire, UK
Distribution: Mandrake 9.1
Posts: 27

Rep: Reputation: 15
Two points I would like to add.

The first is that if you want have your web server available for the world to see then you will need a static IP address.

The second point is to do with file locations. What has been said above is both correct and will work but if you are creating a complex site or you want to have multiple sites then you will probably be better using Virtual Hosting. That way you can put your files wherever you want.
 
Old 05-22-2003, 06:07 AM   #13
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Rep: Reputation: 32
Quote:
Originally posted by david63
The first is that if you want have your web server available for the world to see then you will need a static IP address.
Not strictly true, check out www.no-ip.com (and there's another whose address I've forgotten) not sure how to set this up under Linux to work automatically but they have a windows app to inform update the domain name to point to the dynamic IP address (or you can do this via the website). Very easy.

HTH

pbhj
 
Old 05-22-2003, 12:34 PM   #14
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
pbhj is right you don't need a fixed ip and there are lost of free services available. Try googling for:
"free dynamic dns"

I used to use:
http://www.myserver.org

They've just been bought over -and I haven't used the service lately but it used to be good.

You can also put your files where you want regardless of whether you use virtual hosts or not. If you only have one site you are best not to use virtual hosts as it can slow down the resonse from apache.
 
Old 05-22-2003, 11:08 PM   #15
Jack Techno
LQ Newbie
 
Registered: May 2002
Location: somewhere in my mind
Distribution: Fedora Core 1
Posts: 15

Rep: Reputation: 0
Question ditto I need apache help

I'm using Mandrake 8.0 which I believe is set up just like RH. I have the server up and running but I don't know how to add content I've tried using netscape composer and making a page just try it put but no go. I get the same page that informs me the apache is working and to replace this file. Can anyone give me step by step or recommend a good book that'll help.

Thanks in advance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache questions renegadeavenger Linux - General 1 07-24-2005 01:41 PM
apache and apache-ssl questions merana Debian 4 03-10-2005 10:10 AM
Questions about Apache swmok Debian 2 04-06-2004 05:49 PM
Apache questions... 1111 Linux - Newbie 2 07-21-2003 01:19 PM
apache questions taizhu Linux - Networking 5 10-30-2002 01:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration