Apache configuration
Results 1 to 6 of 6

Thread: Apache configuration

  1. #1
    Registered User cgonzo's Avatar
    Join Date
    Dec 2002
    Posts
    114

    Apache configuration

    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.

  2. #2
    Registered User Dark Millennium's Avatar
    Join Date
    Jan 2002
    Location
    Nova Scotia, Canada
    Posts
    440
    Quote Originally Posted by cgonzo
    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 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
    The strength of the turbulence is directly proportional to the temperature of you coffee.
    (Gunter's Second Law of Air Travel)

    If a program is useful, it will have to be changed.
    (Laws of Computer Programming, III)

    Thanx to Adept for the Avatar

  3. #3
    Registered User cgonzo's Avatar
    Join Date
    Dec 2002
    Posts
    114
    Quote Originally Posted by Dark Millennium
    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.

  4. #4
    Registered User +Daemon+'s Avatar
    Join Date
    Jan 2002
    Location
    RC, Ca
    Posts
    3,406
    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.

  5. #5
    Registered User cgonzo's Avatar
    Join Date
    Dec 2002
    Posts
    114
    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.

  6. #6
    Registered User cgonzo's Avatar
    Join Date
    Dec 2002
    Posts
    114
    Never mind, found the solution. Edited the httpd.conf serverName line

    Found the solution here
    http://httpd.apache.org/docs/misc/FA...set-servername

    http://httpd.apache.org/docs/mod/core.html#servername

Similar Threads

  1. Apache Vulnerability in all versions up to 1.3.24 and 2.0 to 2.0.36
    By wetweb in forum Spyware & Antivirus - Security
    Replies: 0
    Last Post: June 17th, 2002, 04:58 PM
  2. [RESOLVED] Reinstall Win ME w/RAID configuration
    By JFerragamo in forum Windows 95/98/98SE/ME
    Replies: 2
    Last Post: September 26th, 2001, 07:56 PM
  3. [RESOLVED] cannot read ip configuration
    By HugoJr in forum Windows 95/98/98SE/ME
    Replies: 1
    Last Post: December 8th, 2000, 11:11 AM
  4. [RESOLVED] Backing up the Raid configuration
    By hi_tek in forum Hard Drive/IDE/SCSI Drivers
    Replies: 0
    Last Post: September 28th, 2000, 08:47 AM
  5. [RESOLVED] Intel Plug and Play Configuration Utility
    By rogerkirk in forum BIOS/Motherboard Drivers
    Replies: 0
    Last Post: June 22nd, 1999, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •