Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Apache Help!, Server up and running, but!!!!
Wickedinterface
post Oct 19 2003, 09:33 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 19-October 03
Member No.: 1,650



Hi i just did a search here and fouund nothing on apache in the forums. I get the test page on the local host but i am stuck on how to change it. I have RTM and i am still stuck so any help is appreciated
Go to the top of the page
 
+Quote Post
hughesjr
post Oct 20 2003, 06:23 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



You have a default html root directory as part of the install...you should always tell us your distro and program version (ie RedHat 9, httpd-2.0.40) so we can be more specific with the help answers...

Depending on the Linux distribution you installed and the way you installed apache (default package from the distro or built from source) that directory can be located many places...

You can tell where the default html root directory is by searching for this in your httpd.conf file ... which can also be in many places.

inside your httpd.conf file look for this variable:

DocumentRoot

My httpd.conf (located in /etc/httpd/conf on my installation) says this:

DocumentRoot "/var/www/html"

So for me, my html files are in the /var/www/html directory ... the test page you see is the page named index.htm or index.html in the /var/www/html directory.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
cagey cretin
post Nov 15 2003, 08:11 PM
Post #3


./configure
***

Group: Members
Posts: 96
Joined: 9-September 03
Member No.: 1,413



Same problem here:

RedHat 9.0
Apache 2.0.48

I took the defaults:

serverroot = "/usr/local/apache"

documentroot = "/usr/local/apache/htdocs"

Any help you could give...

I did have it working yesterday, though I had to put it in a different directory: "/var/www", because the testpage says that Apache prepends/appends the file name. But then Mozilla wouldn't start, so I chucked the whole thing and reinstalled RedHat, recmpiled Apache, etc.

Today, I can't get squat. Please put me out of my misery...

Thank you,

Joe Wilk
Go to the top of the page
 
+Quote Post
cagey cretin
post Nov 16 2003, 09:21 AM
Post #4


./configure
***

Group: Members
Posts: 96
Joined: 9-September 03
Member No.: 1,413



Updated Sunday 8:00 am est...

Yeah, well. I put the docs in "/var/www", and you can see them. The documentroot is still "/usr/local/apache/htdocs". That makes zero sense to me. Can anyone explain that? I don't see how the documnentroot has anything to do with where the documents actully reside. huh.gif

Also, what is going to happen when I set up virtual servers? What are their literal paths going to be?

Thanks for taking the time to read...

Joe Wilk
Go to the top of the page
 
+Quote Post
hughesjr
post Nov 16 2003, 10:07 AM
Post #5


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



DocumentRoot is where the documents go for the main server ... it is the root directory of your webserver.

It is possible that you can change that by turning on vitrual directories and using things like http headers.

As to why you see things from /var/www/ instead of /usr/local/apache/htdocs ... there are several explainations (other than you may have setup a virtual directory)...

1. You have apache installed both as an rpm and compiled by you. If you did this, there will be an auto start script that starts the rpm version of apache. The default location of the html directory for rpm installed version is /var/www/html.

2. You may have a logical link from /var/www/ to /usr/local/apache/.

3. You may have installed a package (like oracle database server, for one) that has it's own version of apache included as part of the install ... and that may be starting and using the /var/www/ directory.

Reguardless .... if you have a DocumentRoot variable in a valid httpd.conf from an Apache web server that is started, that is where the main files for that server go.
--------------------------------------
Do this command to see if you have httpd installed as an rpm as well as the compiled version:

rpm -qa | grep httpd

also do this command to see if you have more than one httpd.conf file...

find / -name 'httpd.conf'

look at the file /etc/init.d/httpd and see if it is pointing to a different httpd.conf than the version you compiled,


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
cagey cretin
post Nov 16 2003, 01:25 PM
Post #6


./configure
***

Group: Members
Posts: 96
Joined: 9-September 03
Member No.: 1,413



[quote]Hughesjr:
  • Do this command to see if you have httpd installed as an rpm as well as the compiled version:

    rpm -qa | grep httpd
[/quote]

Yep. I have a 1.x from RedHat in there too. cool.gif

[quote]Hughesjr:
  • also do this command to see if you have more than one httpd.conf file...

    find / -name 'httpd.conf'
[/quote]

Yup. There are two. cool.gif

[quote]Hughesjr:
  • look at the file /etc/init.d/httpd and see if it is pointing to a different httpd.conf than the version you compiled,
[/quote]

Cha-ching!! biggrin.gif Indeed it is.

Thank you so much for showing me where to look, and what to look for, HughesJr. I really appreciate the help, both here and on an earlier issue a few months ago. biggrin.gif
Joe Wilk
Go to the top of the page
 
+Quote Post
hughesjr
post Nov 17 2003, 09:08 AM
Post #7


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



Glad to help! ... this one is from personal experience! I had a production server that went haywire after the installation of Oracle ... I had 2 different versions of apache on the server where I thought there was only one...

good luck with the rest of the setup...


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd October 2017 - 07:00 AM