LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-06-2009, 05:18 PM   #1
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Rep: Reputation: 30
Apache issue with "AddType" line.


I've recently installed the LAMP platform on my Fedora machine (Linux apache mysql php) and I am having a weird issue when I type "localhost" in my browser. When I do this, I receive the download pop up that says

"You have chosen to open

which is a application/x-httpd-php
from http://localhost

I can only assume it is refering to the "AddType" line that is in my httpd.conf file that instructs the server to process php files as a php script

Code:
<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    AddType application/x-httpd-php .php .html

    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
When I enter my ip address 10.3.0.99, I receive the typical "IT works page". When I enter the phpinfo page "http://localhost/phpinfo.php" I receive the correct PHP version information.

Within the httpd.conf file, I have ServerName designated as the 10.3.0.99 private address since this is a machine on a private network at work.

When I enter the loop back address 127.0.0.1, I receive the proper "it works" page.

My /etc/hosts file looks correct:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               FireCracker localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6


Not sure why the private ip address and not the Localhost name is returning the "IT works" index.html.

Anybody have any idea where I should look?

Last edited by tekmann33; 01-06-2009 at 05:57 PM.
 
Old 01-07-2009, 02:27 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,497

Rep: Reputation: 90
Quote:
My /etc/hosts file looks correct:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               FireCracker localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
Not sure why the private ip address and not the Localhost name is returning the "IT works" index.html.

Anybody have any idea where I should look?
How about changing

Code:
::1             localhost6.localdomain6 localhost6
to

Code:
::1             development localhost.localdomain localhost
?

My /etc/hosts looks like this:

Code:
127.0.0.1               development localhost.localdomain localhost
::1             development localhost.localdomain localhost
and the rest of my setup is pretty much exactly like yours.

I. e. I have the word "development" (the name of my system) before "localhost.localdomain".

However, if I just go to

Code:
http://localhost
in a browser on my system, I get to the "it works" page, with the URL reading

Code:
http://localhost/
...

Hope this helps
 
Old 01-08-2009, 09:00 AM   #3
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Original Poster
Rep: Reputation: 30
I rebooted the machine, without making any changes, and the issue corrected itself.

Not sure what the problem was.
 
  


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
SSH issue ""Server unexpectedly closed network connection" Errsta_Fonzarelli Linux - Software 12 05-24-2010 03:35 PM
USB stopped working -- lsusb results in: "Unknown line at line" jgombos Linux - Hardware 3 04-20-2008 07:37 PM
How does "motd" work? And how about "issue"? rm_-rf_windows Linux - General 8 07-01-2007 01:53 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM
cdrecord command-line parentheses "(" ")" coolingtower Linux - Software 1 10-28-2005 12:49 PM


All times are GMT -5. The time now is 01:25 PM.

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