LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Insatlled Apache but can find it?? (https://www.linuxquestions.org/questions/linux-software-2/insatlled-apache-but-can-find-it-79774/)

l0f33t 08-07-2003 04:18 AM

Insatlled Apache but can find it??
 
I just installed Apache on my Mandrake 9.0 box.

This is really strange. I'm either very tired or its my noobness to linux.

I can get to http://localhost and the default Apache page comes up.

Even when I open a shell and login as root I'm not able to find the apache directory anywhere. The doumentation suggests that its /usr/local/apache. The only files that I can find are:
apachectl
apachectl-perl
in the /usr/sbin directory...

Am I missing something?

Thanks, :o

Antoine 08-07-2003 08:06 AM

start apache with
apachectl start
find your htdocs or www directory with:
find / -name www or find / -name htdocs

good luck...

Cooner 08-07-2003 08:20 AM

httpd.conf is probably in /etc/apache or /etc/httpd/conf
the rest is probably /var/www

Mathieu 08-07-2003 08:32 AM

If you want to look for something, you can always use the whereis command.
In this case, you would type:
Code:

whereis httpd
This will display a list of files and directories.

l0f33t 08-07-2003 05:10 PM

Wow. Thanks everyone. This helps bunches.

2 quick questions.

1) Why is it that when I'm doing turoials ex. An Apache tutorial they are having me look in directories that don't exist. Like the one I'm doing now says as an example:
***********************************************
>The Apache distribution does come with another method of starting, stopping, and restarting Apache. The script is called apachectl. In the Apache src directory (apache_1.3.9/src), type make at the prompt. You will see a few more files compiled. After make is done, go to the support directory (apache_1.3.9/src/support), where you will find a bunch of new files created. Among them, you'll find a few helper scripts, including apachectl, htpasswd (used to make Apache passwords for protected directories), and rotatelogs (its use is explained later). There are a few other files, but these are the most important.

Make a copy of these three files to your Apache binary directory. If you did not change the default settings, this would be located at /usr/local/apache/bin/.


To start the server, use


/usr/local/apache/bin/apachectl start


There is also

/usr/local/apache/bin/apachectl stop

and


/usr/local/apache/bin/apachectl restart
********************************************
I thought that all linux/unix file/directory structures were uniform? Is this a Linux Mandrake thing? This really through me way off. And this isn't the first time that I've tried to follow a doc and get totally lost. This is like assumed information which is what makes learning linux/unix very tricky. People always assume that you know so much. Atleast thats what it seems like.

2) When I use the find / -name www (logged in as non root) I get a huge list of files/paths with (permission denied)
So I su and issue the same command:
[root@localhost /]# find / -name www
find: /mnt/floppy: Input/output error
find: /mnt/cdrom: Input/output error
/var/www

I did a "man find" but had a hard time deciphering the options I used. "/" tells find to start looking in the / directory? "-name" tells find to look for the Directory name "www" in the / directory?
What if I wanted to find a specific file not a directory but didn't know where this file was and wasn't sure of the correct spelling?

Thanks again. You guys have been a huge help. Much appreaciated.

lfur 08-07-2003 05:19 PM

Use:
Code:

find / -name file.name
In file.name you can use *, ?, [] for searching for different patterns of file names. If there is a specific file type you want to find, use:
Code:

find / -name file.name -type f
for a regular file. Use man find for more -type options. And ... / is your main directory, father of them all :)

l0f33t 08-07-2003 05:43 PM

Thanks lfur,

What the heck is "code:"? I'm assuming that your mean "command" then followed be the example commands below?

Thanks,

lfur 08-07-2003 06:27 PM

l0f33t,

code is just a header of the command. LinuxQuestions.org uses some vB (similar to HTML) code, with wich you can format your text, so it is more readable.

Yes, use what is between those two lines.

Enjoy

l0f33t 08-07-2003 07:21 PM

Thanks lfur.

arnold 08-07-2003 07:36 PM

BTW, how did u inststall apache? Hopefully with rpm?
Then you can, e.g. (I run Mandrake):
rpm -qil apache-conf-1.3.23-4mdk

l0f33t 08-07-2003 08:36 PM

Arnold,

You rock-n-roll.

This is very good to know. Is there a same command for tar files that lets you see the paths like when you do a "./configure" "make", "make install"?

I was just about to uninstall this and install from the source instead of the rpm. The only reason that I planned on doing that is because every Apache tutorial out there seem to all have the same directions and path conventions.

I.E. path conventions used in the all the tutorials I've been at use the path conventions of:
/usr/local/apache
/usr/local/apache/bin (start and stop commands within here)
and numerous other examples that I'm not able to follow.

When installing from the source will this put things in directory paths listed in the tutorials? Did RPM do things differently?

Just curious...
Thanks Arnold.


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