LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache issue with "AddType" line. (https://www.linuxquestions.org/questions/linux-newbie-8/apache-issue-with-addtype-line-695435/)

tekmann33 01-06-2009 04:18 PM

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?

rylan76 01-07-2009 01:27 AM

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

tekmann33 01-08-2009 08:00 AM

I rebooted the machine, without making any changes, and the issue corrected itself.

Not sure what the problem was.


All times are GMT -5. The time now is 03:36 PM.