簡體   English   中英

使用xampp / mysql工作台/

[英]Using xampp/mysql workbench/

我試圖重定向到本地主機上的網頁,我已經從主機文件和虛擬主機完成了所有必要的配置,它從名為name的C:\\ Windows \\ System32 \\ drivers \\ etc主機文件中獲取了我的地址。本地,但不顯示主頁。 請記住,該網站同時具有前端和后端訪問權限。 我是新手,想先在本地處理我的應用程序,然后才能在服務器上開始對其進行編輯。

您發布了此附加評論,其中包含您的vhost定義和主機文件內容

v-host file 
<VirtualHost 127.0.0.1:80> 
    DocumentRoot "c:/xampp/htdocs/intranet" 
    ServerName gep.local 
    ServerAlias gep.local 
    CustomLog "c:gep.local-access_log" combined 
    ErrorLog "c:gep.local-error_log" 
    <Directory "c:/xampp/htdocs/intranet"> 
       DirectoryIndex index.php 
       Options Indexes FollowSymLinks 
       AllowOverride All
       Order allow,deny 
       Allow from all 
    </Directory> 
</VirtualHost> 


host file: 
127.0.0.1 gep.local

這里有一些建議:

您是否重新啟動或重新啟動了DNS客戶端以激活您的HOSTS文件更改。

from a command window run started using 'Run as Administrator' do this
net stop "DNS Client"
then once it reports as STOPPED
net start "DNS Client"

這將刷新Windows DNS緩存。 (由於服務名稱中有空格,因此需要雙引號)

首先將<VirtualHost 127.0.0.1:80>更改為<VirtualHost *:80>

如果使用的是Apache 2.2.x,則還需要一個NameVirtualHost *:80參數作為vhost定義文件中的第一個參數。 如果您使用的是Apache 2.4.x,我相信他們刪除了此要求,因此在該版本的Apache上沒有必要。

所以

new v-host file 

NameVirtualHost *:80

<VirtualHost *:80> 
    DocumentRoot "c:/xampp/htdocs/intranet" 
    ServerName gep.local 
    ServerAlias gep.local 
    CustomLog "c:/gep.local-access_log" combined 
    ErrorLog "c:/gep.local-error_log" 
    <Directory "c:/xampp/htdocs/intranet"> 
       DirectoryIndex index.php 
       Options Indexes FollowSymLinks 
       AllowOverride All
       Order Allow,Deny 
       Allow from all 
    </Directory> 
</VirtualHost> 

然后當然要對其進行測試,請使用瀏覽器地址欄中的地址“ http://gep.local ”訪問此新的虛擬主機。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM