LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-21-2004, 02:12 PM   #1
dave bean
Member
 
Registered: Jun 2003
Location: UK
Distribution: Slackware 9.1
Posts: 136

Rep: Reputation: 15
cant configure apache


Hi
I recently just configured apache on my xp box and now im trying to do the same with slackware (using the apache that came with slack 9.1).

I made a directory /var/www/rixweb (with conf,logs, htdocs) and i type

httpd -d /var/www/rixWeb

Everytime i do this apache still brings me its default directory. I've tried commenting out my httpd.conf in rixWeb and it doesn't complain, equally i've filled it with wrong syntax. So i guess it cant be reading it. The httpd.conf in etc/apache is the default.

How can i get it to read my httpd.conf when using the -d flag please ?

My httpd.conf file in rixweb is:
Code:
ServerType standalone
ServerName "rix"
ServerRoot "/usr"
DocumentRoot "/var/www/rixWeb/htdocs"
help much appreciated
 
Old 02-21-2004, 02:28 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Re: cant configure apache

Quote:
Originally posted by dave bean
Hi
I recently just configured apache on my xp box and now im trying to do the same with slackware (using the apache that came with slack 9.1).

I made a directory /var/www/rixweb (with conf,logs, htdocs) and i type

httpd -d /var/www/rixWeb

Everytime i do this apache still brings me its default directory. I've tried commenting out my httpd.conf in rixWeb and it doesn't complain, equally i've filled it with wrong syntax. So i guess it cant be reading it. The httpd.conf in etc/apache is the default.

How can i get it to read my httpd.conf when using the -d flag please ?

My httpd.conf file in rixweb is:
Code:
ServerType standalone
ServerName "rix"
ServerRoot "/usr"
DocumentRoot "/var/www/rixWeb/htdocs"
help much appreciated
Did you make sure your <directory> tags include the same path as your DocumentRoot:

Code:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/rixWeb/htdocs">
And why are you starting it with httpd -d /var/www/rixWeb ?

If this is the default install of Slackware with the default apache server, do this to start the server:

apachectl configtest

If you get no errors then start the server like this:

apachectl start

Cheers.
 
Old 02-22-2004, 10:39 AM   #3
dave bean
Member
 
Registered: Jun 2003
Location: UK
Distribution: Slackware 9.1
Posts: 136

Original Poster
Rep: Reputation: 15
hi, thanks for the reply
well im just following a tutorial in a book, i did the exact same thing with windows (but as we know is better to work with linux/unix). If i edit httpd.conf in /etc/apache so the document root points to my site then it serves it fine. But the book says to leave this file as it is and to write a new one in /var/www/rixWeb/htdocs, then point to it with the:

httpd -d /var/www/rixWeb/htdocs

Is it not common practice to use the -d flag ? I notice that apachectl has only very basic options and no flags . .
 
Old 02-22-2004, 12:19 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Okay a few questions then:

What version of Apache are you running? And the book is somewhat right in not using same file but I'd suggest using the original, maybe making a backup copy of it just in case and run apache by the command I've given.

And what book are you reading or following? Sometimes it can depend on the distro on some of the commands given in books and alot will go with the most common distros like Redhat and such, etc.
 
Old 02-22-2004, 12:57 PM   #5
dave bean
Member
 
Registered: Jun 2003
Location: UK
Distribution: Slackware 9.1
Posts: 136

Original Poster
Rep: Reputation: 15
hi
im running (on slack 9.1):
Server version: Apache/1.3.28 (Unix)

As for the book, im using a university guide for web server configuration that my friend gave me. Its based on Apache, the definitive guide by Laurie and Laurie. The assumed platform for the guide is win32 so its good to have your thoughts on running the server with linux/unix
 
Old 02-22-2004, 01:28 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Quote:
Originally posted by dave bean
hi
im running (on slack 9.1):
Server version: Apache/1.3.28 (Unix)

As for the book, im using a university guide for web server configuration that my friend gave me. Its based on Apache, the definitive guide by Laurie and Laurie. The assumed platform for the guide is win32 so its good to have your thoughts on running the server with linux/unix
Yeah, if the guide is aimed for Win32.. put it down, burn it for that matter..

I'd suggest reading some of the docs at http://httpd.apache.org and or even browsing the forums here. Slackware from my standpoint works best when using the apachectl command to start and stop or the actual httpd script in /etc/rc.d

And it is okay to edit your existing file and then you won't need to run any goofy commands to try and make apache use the other configs you've created.
 
Old 02-22-2004, 02:24 PM   #7
dave bean
Member
 
Registered: Jun 2003
Location: UK
Distribution: Slackware 9.1
Posts: 136

Original Poster
Rep: Reputation: 15
yeah it seems a bit strange to use the -d flags. well as long as it doesn't serve any useful purpose to use them i can happily do without.

thanks for the advice
 
Old 02-22-2004, 03:22 PM   #8
fortezza
Member
 
Registered: Mar 2003
Location: Colorado
Distribution: Fedora Core 4
Posts: 297

Rep: Reputation: 30
Apache on Fedora

On Fedora the doc ( html ) directory defaults to /var/www/html , the conf file in /etc/httpd/conf/httpd.conf .

I start Apache 2.0 using /etc/init.d/httpd start , and that binary ( httpd ) supports all the other flags ( configtest, reload, restart, etc. ). The "configtest" option is definitely a good idea, and the above recommendation to read the docs on apache.org is a must. There is a lot you can do with Apache, just tons. I myself am running several named-base virtual server from it,and it works like a charm.

Anyhow, I hope you get your web server up and running soon, b/c securing and getting the site to work the way you want it to is the hard part.

Oh, /var/log/httpd/error is my default error log location, for troubleshooting problem with Apache 2.0, I specified 2.0 as you said you are running 1.3 so I wanted to alert you to the fact the file locations may not match.
 
Old 02-23-2004, 08:38 PM   #9
dave bean
Member
 
Registered: Jun 2003
Location: UK
Distribution: Slackware 9.1
Posts: 136

Original Poster
Rep: Reputation: 15
thanks fortezza,

. . . ill just get back to my manuals now
 
  


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
Configure Apache Megasms Programming 3 11-04-2005 05:36 AM
Trying to configure apache partyk1d24 Linux - Newbie 7 06-24-2005 03:16 AM
configure apache tux66 Slackware 11 05-02-2005 03:49 PM
how to configure apache Roll Linux - Software 1 03-06-2005 11:14 AM
Configure Apache esasse Linux - Newbie 2 12-02-2004 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:01 AM.

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