LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2004, 11:38 AM   #1
harlow400
LQ Newbie
 
Registered: Jan 2003
Location: South Portland, Maine USA
Distribution: Slackware 9.0
Posts: 12

Rep: Reputation: 0
Question Should the apached httpd.conf be chmod to 755?


Hello. i am running slack 9.0 and have apache 1.3 installed and it seems to work. the installation docs suggested that the prefix should be /usr/local/apache. it installed there fine, but i have two or three questions: should my website docs reside in usr/local/apache/htdocs, or var/www/htdocs? my browser does not want the first choice; localhost automatically looks in var/www/htdocs even though i specify usr/local/apache/htdocs in the httpd.conf file. which leads me to my second question: do i need to chmod the permissions on the httpd.conf file after configuration or leave it alone? if i chmod it to 755 and do this: ./httpd.conf every line in the file returns a "command not found". grrrrr.

thanks!

joe
 
Old 02-11-2004, 01:33 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
httpd.conf is not an executable file. It is a file that is read by apache when it starts up. You probably have to restart apache after you make a change in that file to get it to work. I suggest using apachectl to start/stop/restart apache. You can also do an apachetl configtest to make sure your configuration file doesn't have any errors in it.
 
Old 02-11-2004, 02:29 PM   #3
harlow400
LQ Newbie
 
Registered: Jan 2003
Location: South Portland, Maine USA
Distribution: Slackware 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
ok thx. i simply deleted it and created another. but the problem i still have is that the browser is still not looking at the documents in usr/local/apache/htdocs, but the default var/www/htdocs. can't seem to figure out why. help is appreciated.
 
Old 02-11-2004, 02:40 PM   #4
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Which httpd.conf is read? If you have a distribution-supplied version of Apache installed ( the fact that it looks in /var/www/html suggests that you do) you may have an Apache configuration file in /etc/apache/conf/ or some other directory which is read instead of the locally built one.

Now, if you *do* have a distribution-supplied version of Apache installed it may be that one you're running. So type which apache or which apachectl to find out what Apache executable is actually installed. If you get /usr/sbin/apache or something to that effect instead of /usr/local/apache/bin/apache you know you're executing the wrong one.


Håkan
 
Old 02-11-2004, 02:52 PM   #5
harlow400
LQ Newbie
 
Registered: Jan 2003
Location: South Portland, Maine USA
Distribution: Slackware 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
bullseye hakan. thank you. that is exactly what is happening. the distro version is running and not the one i built..........which leads me to ask (naturally) how do i get mine to run and not the default?

thx for your help!

joe
 
Old 02-11-2004, 04:25 PM   #6
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
One simple way of doing it is renaming the apachectl script that is called run when executing it (the distribution's version) to something like apachectl_distro or whatever you like. Then, in
the directory where that file is located (/usr/sbin?), create a symlink to your own fresh copy of apachectl: ln -s /usr/local/apache/bin/apachectl apachectl

Before actually launching it you could open up apachectl (your locally built copy) to see that the correct apache executable is launched but it probably is, it almost never is a problem.


Håkan
 
Old 02-14-2004, 12:28 AM   #7
harlow400
LQ Newbie
 
Registered: Jan 2003
Location: South Portland, Maine USA
Distribution: Slackware 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
oh man, it was so much simpler than that... all i had to do was instead of simply typing 'apacheclt' at the prompt (which starts the default installation) i simply typed 'usr/local/apache/bin/apachectl.....duh. one of those 'i know so much but know so little' moments. thx for your help.

joe
 
  


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
would you recommend chmod -R 755 *? CodeFish Linux - Security 2 01-22-2005 11:49 PM
chmod 755 won't change file permission. duffboygrim Linux - General 11 04-29-2004 07:17 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-10-2004 12:45 AM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 11:32 PM
CGI without having to CHMOD 755 all the time. qistoph Linux - Software 9 06-21-2002 08:30 AM


All times are GMT -5. The time now is 06:19 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