Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-05-2002, 02:08 AM
|
#1
|
LQ Newbie
Registered: May 2002
Location: Hong Kong
Posts: 6
Rep:
|
Apache Document Root Path
I have just installed RedHat 7.0, MySQL 3.23.33 and Apache 1.3.19. But then, after I have installed Apache, I discovered that the Document Root of Apache Server is /var/www/html, not /usr/local/apache/htdocs.
I have already set the httpd.conf's document root to /usr/local/apache/htdocs, but nothing changed.
Can someone tell me why? Thanks.
|
|
|
06-05-2002, 02:16 AM
|
#2
|
LQ Newbie
Registered: May 2002
Location: Hong Kong
Posts: 6
Original Poster
Rep:
|
One more thing
Moreover, I have tried to use the following command to restart apache server, then I got the following output.
#/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
/usr/local/apache/bin/apachectl restart: httpd started
I have tried several times, but still this output.
But does Linux tell me that httpd is not running?
|
|
|
06-05-2002, 02:17 AM
|
#3
|
Member
Registered: Sep 2001
Distribution: Gentoo
Posts: 760
Rep:
|
Did you restart Apache?
What's wrong with /var/www/html? Its the location advised by the Linux Standards Base.
|
|
|
06-05-2002, 02:24 AM
|
#4
|
LQ Newbie
Registered: May 2002
Location: Hong Kong
Posts: 6
Original Poster
Rep:
|
Yup, I have restart the apache server with the following command:
#/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
/usr/local/apahce/bin/apachectl restart: httpd started.
Because I want to install PHP, but I don't know I can't install it. I have tried to install PHP for many many times, I have edited the httpd.conf for PHP 4, but still, it is not workable. The page only display the code, but not the PHP output.
Can anyone tell me the FULL process for installing the PHP? Thanks a lot.
|
|
|
06-05-2002, 04:13 AM
|
#5
|
Member
Registered: Sep 2001
Distribution: Gentoo
Posts: 760
Rep:
|
The full process for installing PHP varies a lot depending on how you install it. For example, the full process for installing it on my system was.
Code:
apt-get install php4 php4-mysql phpdoc
(and tap {Return} a few times)
PHP, btw, is quite happy with the document root in /var/www
Last edited by dorward; 06-05-2002 at 04:17 AM.
|
|
|
06-05-2002, 06:11 AM
|
#6
|
Member
Registered: Mar 2002
Location: South UK
Distribution: Mandrake 8.2
Posts: 103
Rep:
|
Okay, I can add my comments, because I've just installed the latest PHP and APACHE and got them going. I'm running Mandrake 8.2 and thought that my installation would deal with the configuration. This turned out to not be the case. After a session on IRC (thanks Morn) I updated my APACHE and then PHP.
Apache first. IIRC, I couldn't go for the rpm install version because it's the same version as my installation one. So I went to apache and downloaded the tar.gz - which turned out to be easier than I thought. I followed the readme's and installed. I recommend you get the latest Apache.
Then, install PHP, and, if you're lucky, it will configure httpd.conf for you (the apache confg file). If you're not lucky then a couple of lines of code should do it (it did for me).
If you need more help, just shout.
HTH.
|
|
|
06-05-2002, 03:40 PM
|
#7
|
LQ Newbie
Registered: Oct 2001
Posts: 2
Rep:
|
Quote:
Originally posted by bowen
Yup, I have restart the apache server with the following command:
#/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
/usr/local/apahce/bin/apachectl restart: httpd started.
Because I want to install PHP, but I don't know I can't install it. I have tried to install PHP for many many times, I have edited the httpd.conf for PHP 4, but still, it is not workable. The page only display the code, but not the PHP output.
Can anyone tell me the FULL process for installing the PHP? Thanks a lot.
|
Try running the deamon /etc/rc.d/init.d/httpd start
|
|
|
06-06-2002, 10:11 AM
|
#8
|
Member
Registered: Mar 2002
Location: South UK
Distribution: Mandrake 8.2
Posts: 103
Rep:
|
You need to configure your httpd.conf file (which is normally in /etc/conf/ but can also be in conf within the apache directory).
This file tells apahce what to do when certain requests are made of it. When Apache receives a request for a PHP file it needs to know where PHP is as PHP is the donkey that does all the work. Once it has done the donkey work, it gives it back to Apache to display.
Clearly, the fact that you are seeing the code means that PHP is not getting it.
Can you display the lines in httpd.conf. It's a shame I'm at work, because if I was at home, I'd post the couple of lines in my httpd.conf and you could try them. If I remember, when I get home, I'll put them up.
|
|
|
11-29-2002, 02:13 AM
|
#9
|
LQ Newbie
Registered: Nov 2002
Location: UK
Distribution: Debian Sarge
Posts: 17
Rep:
|
I have a problem where I have the httpd.conf in the install dir for apache2 and in /etc/httpd/conf/httpd.conf and in /usr/local/apache2/conf/httpd.conf
Can anyone tell me which one I should be editing?
|
|
|
All times are GMT -5. The time now is 10:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|