LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   cant configure apache (https://www.linuxquestions.org/questions/slackware-14/cant-configure-apache-148803/)

dave bean 02-21-2004 01:12 PM

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

trickykid 02-21-2004 01:28 PM

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.

dave bean 02-22-2004 09:39 AM

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 . .

trickykid 02-22-2004 11:19 AM

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.

dave bean 02-22-2004 11:57 AM

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

trickykid 02-22-2004 12:28 PM

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.

dave bean 02-22-2004 01:24 PM

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

fortezza 02-22-2004 02:22 PM

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.

dave bean 02-23-2004 07:38 PM

thanks fortezza,

. . . ill just get back to my manuals now ;)


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