Click to See Complete Forum and Search --> : Apache configuration
cgonzo
June 11th, 2004, 11:02 AM
Hi, all. I am trying to set up a Lamp server. This is my first experience with Linux. I installed RedHat 9 without Apache, php or Mysql. Then followed the guide that I found here: http://www.brtnet.org/linux/lamp.htm
My problem is that I have two different httpd.conf files. One is located at /usr/local/apache/conf and the other is located at /etc/httpd/conf.
One says that my document root is located at /usr/local/apache/htdocs and the other says /var/www/html.
My *.html docs show up in my browser when I put them under the /var... path but *.php docs show up as raw code. Everything I have read says that the config file under /usr... should be the correct one to edit for my changes to take place.
Any ideas would be appreciated.
Dark Millennium
June 13th, 2004, 03:43 PM
Hi, all. I am trying to set up a Lamp server. This is my first experience with Linux. I installed RedHat 9 without Apache, php or Mysql. Then followed the guide that I found here: http://www.brtnet.org/linux/lamp.htm
My problem is that I have two different httpd.conf files. One is located at /usr/local/apache/conf and the other is located at /etc/httpd/conf.
One says that my document root is located at /usr/local/apache/htdocs and the other says /var/www/html.
My *.html docs show up in my browser when I put them under the /var... path but *.php docs show up as raw code. Everything I have read says that the config file under /usr... should be the correct one to edit for my changes to take place.
Any ideas would be appreciated.
Hello,
Firstly you set your document root in the httpd.conf file. I believe with Apache 2.0 and up it by default is /var/www/html but you can certainly change it.
As to the location of httpd.conf itself. Allowing the distribution to install apache puts the conf file in /etc/http/conf/. From what I see from the sites you are using, (which look a tad incomplete and a bit vague), when you compile apahce manually the configuration files will be where you put them.
If you followed the web site to the letter, (and I highly suggest going to
apache.org (http://www.apache.org) for the most up to date info), your config files are likely under /usr/local/apache/conf...
As for the files in /etc... either they got put there during compilation because redhat 9.0 needs something there...or you may actually have installed apache when you installed linux, (or possibly a related rpm that was not unchecked). The easiest way to find out is to do an rpm-qa | grep -i apache and see if you have different versions showing up
Good Luck
cgonzo
June 14th, 2004, 08:14 AM
Hello,
As for the files in /etc... either they got put there during compilation because redhat 9.0 needs something there...or you may actually have installed apache when you installed linux, (or possibly a related rpm that was not unchecked). The easiest way to find out is to do an rpm-qa | grep -i apache and see if you have different versions showing up
Good Luck
That is what happened. I had installed the httpd rpm with RedHat. I started over again and was successful this time. Thanks.
+Daemon+
June 14th, 2004, 10:31 AM
heres a note, look on redhats site to configure apache, since they dont install apache or anyof the apps in the correct place, they intall them were they want them, one reason why I stopped using redhat.
cgonzo
June 14th, 2004, 11:02 AM
Now I have a new question, same theme: I have created user accounts, created public_html directory for them. I can access the home page for my user if I go to 10.10.200.20/~user/ but not if I go to 10.10.200.20/~user
The only difference is in the trailing slash. I have looked in my httpd.conf file and it appears to be correct there.
Here are the lines in the httpd.conf
#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
Thanks for all your patience with me.
cgonzo
June 14th, 2004, 01:11 PM
Never mind, found the solution. Edited the httpd.conf serverName line
Found the solution here
http://httpd.apache.org/docs/misc/FAQ.html#set-servername
http://httpd.apache.org/docs/mod/core.html#servername