0

我的/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

我的/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>

服务器名称在apache2/httpd.conf

ServerName 127.0.1.2 mgip

我的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>

我做了所有必要的步骤来设置这个网站中显示的虚拟主机:
How To Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS
as well as on other,但找不到确切的问题。

这是config.php我网站的文件:

<?

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

  ),
  $configOption
);

define('ADMIN_EMAIL',"pramod.036@gmail.com");
$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_";

早些时候它给了我一个错误,用户拒绝访问'mgip'@'localhost'。我创建了一个拥有该数据库所有授权的新用户。数据库问题已解决,但它仍然给我一个空白的白页。

请帮帮我。

4

0 回答 0