LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2003, 11:07 AM   #1
nidua18
LQ Newbie
 
Registered: Sep 2003
Posts: 26

Rep: Reputation: 15
Question Newb Apache config help.


Word of caution: I'm fairly new to Linux and completely new to Apache so please be patient.



Now, I just installed Apache 2 on RH9 as I am trying to test some web based application. After reading some of the documentation I still don't know what I am doing.

The default root directory in the httpd.conf is the ../htdocs so I created a sub folder in htdocs and copied some html docs there but I can access them via browser. I do get the default page telling me that the apache was installed and is up and running but that's about it.

There is also a /var/www folder so I tried to change the httpd.conf to have this as a root. Again, I created a subfolder with some html docs and again a could access them.

So my questions are: Where should I keep all my html docs, what is the preferred locations for them. And finally how should I configure the Apache server to run properly, some examples would be great.
 
Old 09-23-2003, 11:14 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Welcome to LQ.

You can keep your docuements where you wnat - I would suggest on a partition with plenty of space. Wherever you decide to put them you must change the DocumentRoot directive and hte Directory directive beneath in httpd.conf to the directory you choose. Once you have change httpd.conf you must restart apache. You should just need to put the fiels in that directory. The files and directories will need to be readabel byt he user that your webserver runs as - see the User and Group directives in httpd.conf
 
Old 09-23-2003, 11:29 AM   #3
nidua18
LQ Newbie
 
Registered: Sep 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
Welcome to LQ.
Thanks. Great forum BTW.

So if I understand you correctly the reason I could not access my html docs in the sub folder I created in /htdocs is because permitions were not set correctly?
 
Old 09-23-2003, 11:58 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
It could be. What error did you get?
 
Old 09-23-2003, 12:18 PM   #5
nidua18
LQ Newbie
 
Registered: Sep 2003
Posts: 26

Original Poster
Rep: Reputation: 15
I am getting error 404 (the requested URL was not found on this server).

I left the default config with htdocs as the document root. I created a sub folder in htdocs called test and inside that folder there is document called index.html. In the browser I entered 'server IP address/test/ index.html' and got the error 404 in return. The server is running as I am getting the test page when I enter jusr the IP address.
 
Old 09-23-2003, 02:25 PM   #6
nidua18
LQ Newbie
 
Registered: Sep 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Well, I think I found the problem. It seems that RH9 likes to install Apache or at least a scaled down version of it without asking for it under var/httpd. It seems that the one I installed under /usr/local/apache2 is not liking it very much. The worst part is that I don't know how to uninstall that one from var/httpd. When I go to add/remove applications and try to uninstall it, it gives me an error that I have to install it first then uninstall it.
 
Old 09-23-2003, 03:59 PM   #7
Robin01
Member
 
Registered: Aug 2003
Posts: 104

Rep: Reputation: 15
Hi nidua18,

I'm pretty new to linux and having the same problem as you are... have u found a solution for you problem with apache....having 2 installation of apache...

please let me konw..I been battling this for a month trying to figure out a way to make the apache i installed work...mine is installed off the /wwwroot...

thanks
 
Old 09-23-2003, 03:59 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Did you install via source or rpm? Had you made a previous installation of apache?
 
Old 09-23-2003, 04:02 PM   #9
Robin01
Member
 
Registered: Aug 2003
Posts: 104

Rep: Reputation: 15
I downloaded the apache from apache.org and compiled and installed it with the following instruction...
http://www10.brinkster.com/ssruprai/...introduction..

I was alos reading another posting which indicated there might be 2 installs of apache.. the one rh9 installes by default when u install linux and the one i installed...
but when i installed linux i didn't chose to have apache installed...
 
Old 09-23-2003, 04:10 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Sometimes apache will be installed to resolve dependencies. It is ok to leave it - it won't do any harm. When you start/stop apache use the apchectl command. It should be located in your install folder.
 
Old 09-23-2003, 04:41 PM   #11
nidua18
LQ Newbie
 
Registered: Sep 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
Sometimes apache will be installed to resolve dependencies. It is ok to leave it - it won't do any harm. When you start/stop apache use the apchectl command. It should be located in your install folder.
Thanks david_ross. So basically I just have to make sure that the RH9 apache is stopped, then start the server I installed. I was just hoping for a cleaner and neater solution like uninstalling it completely, oh well.

Robin01, I guess I am in the same boat as you so if you find a way of getting rid of it completely, if thatís possible, please let me know.

Last edited by nidua18; 09-23-2003 at 04:44 PM.
 
Old 09-23-2003, 07:44 PM   #12
Robin01
Member
 
Registered: Aug 2003
Posts: 104

Rep: Reputation: 15
Hi nidua18,

so, which httpd.conf file are you using.. are u suing the default one(etc/httpd/conf/httpd.conf) or the one from your newly installed apache server.

I have httpd.conf: /etc/http/conf/httpd.conf which was installed by redhat9 itself..

i also have on in my newly installed apache folder: /wwwroot/conf/httpd.conf...

so which one are you using?
 
Old 09-23-2003, 08:14 PM   #13
nidua18
LQ Newbie
 
Registered: Sep 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Robin01;

I just replied to your other thread. Basically I want to uninstall, if I can figure out how, the Apache I downloaded and use the one that came with RH9 since it's already there.
 
  


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
Newb wants to know how to read the config.log diletone Mandriva 4 11-08-2005 08:10 AM
complete apache newb: advice ? qwijibow Linux - Security 9 09-16-2004 03:07 AM
Is anzone willing to help an uber newb config suse? marpil Linux - Newbie 1 03-28-2004 05:25 PM
Newb question: Install/config Tomcat 4.1.27 on RHL 9.0 rudejohn Linux - Software 2 09-01-2003 09:12 PM
newb apache log question spooge Linux - Security 1 03-08-2003 08:14 PM


All times are GMT -5. The time now is 06:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration