[NBLUG/talk] Linux Apache PHP novice

Dean A. Roman droman at romansys.com
Thu Aug 4 09:43:08 PDT 2005


Johnson,

  OK..I'm going to make an assumption here and that is that since the 
httpd binary is no located under /usr/local that your not using the 
config. file in /usr/local.
This is a big assumption, and you should investigate further to be certain.

Check both config. files for the "DocumentRoot" setting, place a sample 
web page in each different DocumentRoot then try going to your server 
via a web browser or something like wget.
You could test this theory by placing a simple web page(as seen below) 
in the "DocumentRoot" of each different config. file:
   FILE NAME:  index.html
   FILE CONTENTS:  Here is my sample web page for location /usr/local/httpd.
   PERMS:  chmod 644 index.html

If your page shows up from a particular spot, then your using the config 
under that file name.

I'm sure there's also a way to check this via the binary..you might try 
something like :  "strings /usr/sbin/httpd | grep -i HTTPD_ROOT"

Taking a look at the man page, you also can see the purported ServerRoot 
directory:
       -d *serverroot*
              "Set the initial value for the ServerRoot directive to 
serverroot. This can  be  overridden  by  the
              ServerRoot directive in the configuration file. _*The 
default is /etc/httpd*_."

Other than that, just testing is probably the quickest way.


Good Luck!

Thanks,
   ---Dean.


Johnson Leung wrote:

>Dean,
>
>Thanks for the reply.
>
>When I do a "which httpd", it returns /usr/sbin/httpd.
>
>Here is the output from "ps aux":
>
>root     24767  0.0  0.8 18748 8256 ?        S   
>Aug02   0:00 /usr/sbin/httpd
>apache   24770  0.0  0.8 18896 8532 ?        S   
>Aug02   0:00 [httpd]
>apache   24771  0.0  0.8 18820 8416 ?        S   
>Aug02   0:00 [httpd]
>apache   24772  0.0  0.8 18840 8440 ?        S   
>Aug02   0:00 [httpd]
>apache   24773  0.0  0.8 18804 8380 ?        S   
>Aug02   0:00 [httpd]
>apache   24774  0.0  0.8 18812 8384 ?        S   
>Aug02   0:00 [httpd]
>apache   24775  0.0  0.8 18820 8412 ?        S   
>Aug02   0:00 [httpd]
>apache   24776  0.0  0.8 18888 8516 ?        S   
>Aug02   0:00 [httpd]
>apache   24777  0.0  0.8 18820 8412 ?        S   
>Aug02   0:00 [httpd]
>
>Thanks,
>Johnson
>
>--- "Dean A. Roman" <droman at romansys.com> wrote:
>
>  
>
>>Johnson,
>>
>> Probably /etc/http/conf/httpd.conf is being used,
>>but to be sure you 
>>could do an "ps aux" to see the httpd process and
>>figure out the path 
>>from the output (look for something with httpd or
>>apache in the name).
>>Alternatively, you could look in the
>>/etc/init.d/httpd file to see where 
>>it is picking up the apache binary from.
>>
>>Look under /var/www/html for the pages, but to be
>>sure look for 
>>"DocumentRoot" in your httpd.conf file.
>>This file is pretty well commented.  Most all basic
>>config. items for 
>>apache are in this file...start with it.
>>
>>I haven't used LAMP before, so I can't help much
>>with that.  However, 
>>PHP, MySQL, and Apache are old friends of mine :-)  
>> .
>>
>>Hope that helped,
>>   ---Dean.
>>
>>
>>
>>
>>jmlleung at yahoo.com wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>I need some help here. I installed Red Hat Linux 9,
>>>      
>>>
>>Apache httpd 2.0.49,
>>    
>>
>>>MySQL 4.0.18, PHP 4.3.4 on my Dell machine a year
>>>      
>>>
>>ago and put it aside. I
>>    
>>
>>>originally planned to practice writing some simple
>>>      
>>>
>>web pages using LAMP.
>>    
>>
>>>Now I am trying to pick it up again. But I don't
>>>      
>>>
>>even remember how to launch
>>    
>>
>>>a html page. My httpd is up and running. 
>>>
>>>I have 2 httpd.conf files. One is under
>>>      
>>>
>>/usr/local/apache2/conf/, and the
>>    
>>
>>>other under /etc/httpd/conf/. Which one is being
>>>      
>>>
>>used? 
>>    
>>
>>>Where should I store the .html files? Is it defined
>>>      
>>>
>>by DocumentRoot in
>>    
>>
>>>httpd.conf?
>>>
>>>Any pointer and/or advice will be appreciated.
>>>
>>>Thanks,
>>>Johnson
>>>
>>>
>>>
>>>_______________________________________________
>>>talk mailing list
>>>talk at nblug.org
>>>http://nblug.org/cgi-bin/mailman/listinfo/talk
>>>
>>>
>>> 
>>>
>>>      
>>>
>>-- 
>>Dean A. Roman
>>President
>>Roman Computer Systems
>>Office: 707-237-6798
>>Fax   : 707-237-2649
>>E-mail: droman at romansys.com
>>Web   : http://www.romansys.com
>>
>>
>>CONFIDENTIALITY NOTICE:
>>This email is intended only for the person(s) to
>>which it is addressed and contains confidential and
>>privileged information. If you are not the
>>addressee(s), or the person responsible for
>>delivering this to the addressee(s), you are hereby
>>notified that reading, copying, or distributing this
>>message is prohibited. If you have received this
>>electronic mail message in error, please contact us
>>immediately at the telephone number shown above and
>>take the steps necessary to delete the message
>>completely from your computer system.
>>-Thank you.
>>
>>
>>_______________________________________________
>>talk mailing list
>>talk at nblug.org
>>http://nblug.org/cgi-bin/mailman/listinfo/talk
>>
>>    
>>
>
>
>_______________________________________________
>talk mailing list
>talk at nblug.org
>http://nblug.org/cgi-bin/mailman/listinfo/talk
>
>
>  
>

-- 
Dean A. Roman
President
Roman Computer Systems
Office: 707-237-6798
Fax   : 707-237-2649
E-mail: droman at romansys.com
Web   : http://www.romansys.com


CONFIDENTIALITY NOTICE:
This email is intended only for the person(s) to which it is addressed and contains confidential and privileged information. If you are not the addressee(s), or the person responsible for delivering this to the addressee(s), you are hereby notified that reading, copying, or distributing this message is prohibited. If you have received this electronic mail message in error, please contact us immediately at the telephone number shown above and take the steps necessary to delete the message completely from your computer system.
-Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://nblug.org/pipermail/talk/attachments/20050804/e6cc89a2/attachment.htm


More information about the talk mailing list