2011-08-19 28 views
-1

很困惑,現在,雖然我覺得我大概瞭解了一下虛擬主機這混淆了我沒有時間結束,我想經過這麼久,我會尋求幫助:PphpMyAdmin的工作時,我關閉某些虛擬主機

我關閉了1個虛擬主機,phpmyadmin將在本地工作,重新打開這個虛擬主機,phpmyadmin結束在這個網頁與我的404網站。有問題的虛擬主機:

<VirtualHost 127.0.0.1> 
DocumentRoot /var/www/mayfieldafc/docroot 
ServerName mayfieldafc.com 
ServerAlias mayfieldafc.local 
#CustomLog logs/mayfieldafc-transfer.log combined 
#ErrorLog logs/mayfieldafc-error.log 

php_value include_path "/usr/share/php:/var/www/mayfieldafc" 
php_value error_reporting 2047 
php_flag magic_quotes_gpc off 
php_flag short_open_tag off 

DirectoryIndex index.php index.html 

<Directory /var/www/mayfieldafc/docroot> 
    Options None 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
</Directory> 

RewriteEngine on 
#RewriteLogLevel 9 
#RewriteLog /var/log/mod_rewrite.log 

# Dispatcher wiring 
RewriteCond %{REQUEST_URI} !dispatch\.php$ 
RewriteCond /var/www/mayfieldafc/docroot%{REQUEST_FILENAME} !-f 
RewriteRule ^(/.*)$ /dispatch.php?url=$1 [L,QSA] 

</VirtualHost> 

<VirtualHost 127.0.0.1> 
DocumentRoot /var/www/mayfieldafc/docroot 
ServerName assets.mayfieldafc.com 
ServerAlias assets-mayfieldafc.local 
#CustomLog logs/mayfieldafc-transfer.log combined 
#ErrorLog logs/mayfieldafc-error.log 

DirectoryIndex index.php index.html 

<Directory /var/www/mayfieldafc/docroot> 
    Options None 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
</Directory> 
</VirtualHost> 

如果有人知道虛擬主機和phpMyAdmin的東西我會永遠愛你:d

+0

對不起,這個愚蠢的問題。你用什麼網址連接到你的網頁?你使用的是http://127.0.0.1嗎? – Joe

+0

你的配置中是否有NameVirtualHost設置? – datasage

+0

至於網址:http:// localhost/phpmyadmin /其中phpmyadmin位於我的根文件夾,http://mayfieldafc.local/位於上面的虛擬主機。我沒有關閉所有其他的虛擬主機,目前只運行mayfield虛擬主機。也謝謝推廣回覆傢伙:) –

回答

-1

最後沒有什麼我可以改變我的虛擬主機設置工作,所以我去了明顯的答案。

我剛剛創建一個單獨的虛擬主機與

servername phpmyadmin.local 

,只是指着myphpadmin我的硬盤驅動器上的文件和所有是好的。

1

使用了NameVirtualHost到主機上的一個IP地址的多個站點需要您在訪問其虛擬主機名稱而不是其IP地址。因此,如果phpmyadmin託管在assets-mayfieldafc.local上,則您必須在assets-mayfieldafc.local/phpmyadmin上訪問它。當只配置一個虛擬主機時,它在本地主機上工作,因爲它只有一個地方用於本地主機IP。在同一個IP上配置更多虛擬主機,您需要通過ServerName/ServerAlias訪問它們。