apache and php problem

If I open with this way: http://localhost/wordpress/

I can see the web page displays fine,

but if i type http://localhost/wordpress/index.php

then it couldn’t display the web page.

and only displays like this :

Quote:
<?php

/* Short and sweet */

define(’WP_USE_THEMES’, true);

require(’./wp-blog-header.php’);

?>

But if i use http://127.0.0.1/wordpress/index.php

then i can see the web page again..

How to solve this problem ? I think localhost = 127.0.0.1 , isnt it?

I tried in ROOT mode… everythings fine..but doesnt work in User Mode

thanks in advance

———————

Solution:

sudo vi /etc/apache2/vhosts.d/00_default_vhost.conf

Mark off this "NameVirtualHost *:80"

add # to front, as

#NameVirtualHost *:80

DONE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s