Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

My /etc/hosts/:

127.0.0.1       localhost
127.0.1.1       ali-VirtualBox-ubuntu
127.0.1.2       mgip

#virtualhost


# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

My /etc/apache2/sites-available:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName mgip

        DocumentRoot /var/www/mgip/html/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/mgip/html/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

ServerName in apache2/httpd.conf:

ServerName 127.0.1.2 mgip

My apache2/ports.conf:

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

I did all the necessary steps to set up a virtual host shown in this website:
How To Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS
as well as on other, but couldn't find the exact problem.

This is the config.php file of my website:

<?

// Bring in and make any configurations.
// (not really implemented anywhere yet).
@$configOption=array_merge( # don't show errors here
  array(

  ),
  $configOption
);

define('ADMIN_EMAIL',"[email protected]");
$defaultDocRoot='/var/www/mgip/html';
define('PUBLIC_USERNAME',"public");
define('PUBLIC_PASSWORD',"password");
$defaultLanguage='en';

// mysql
$databaselocation   =   "localhost";   // Network location of your MySQL Database
$databasename       =   "mgip"; // The name of the database 
$databaseuser       =   "mgip";        // The name of a user 
$databasepass       =   "mysql";            // Password of db user
$databaseprefix     =   "cdc2_";

earlier it gave me an error that access denied for user 'mgip'@'localhost'. I created a new user with all the grants for that database. The DB problem was solved but it still gives me a blank white page.

please help me out.

share|improve this question
    
uh, you've got a mysql error, so what's with all of the apache stuff? that has NOTHING to do with your mysql setup. –  Marc B Oct 10 '13 at 17:17
    
so what exactly i am suppose to do now? i am new to php,apache2 and ubuntu. :( –  ap88 Oct 10 '13 at 17:21
    
figure out what the mysql username/password SHOULD be. –  Marc B Oct 10 '13 at 17:22
    
the mysql username and password are correct. also they have been granted all the privileges. –  ap88 Oct 10 '13 at 17:39
    
What is it you try to configure? Since you only show the start of the config.php it's impossible to say why you get an empty page. If that is indeed the entire file (you miss a ?>) it is it's quite obvious you get a blank page since it does not do anything. What does you Apache log files say? Also I can only assume it is config.php you try to access? –  Qben Oct 11 '13 at 9:36
show 2 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.