簡體   English   中英

httpd-xampp.conf:允許使用主機名而不是IP地址訪問外部系統?

[英]httpd-xampp.conf: Allow Access to an external system using Host Name instead of IP Address?

部署了一個服務器以在內部網絡上使用,我可以在其中使用localhost或從具有靜態IP的10.192.5.78訪問PHPmyAdmin

我要訪問筆記本電腦上的頁面,該頁面沒有靜態IP,但具有NSM作為hostname

當前,在httpd-xampp.conf配置了以下代碼。 我嘗試使用主機名代替IP地址,但是MySQL返回錯誤。

Alias /phpmyadmin "D:/xampp/phpMyAdmin/"
    <Directory "D:/xampp/phpMyAdmin">
        AllowOverride AuthConfig
        Require local
        Require ip 10.192.5.78
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>

httpd-xampp.conf使用Require host (與Apache 2.4.25一起使用)

Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
    AllowOverride AuthConfig
    Require local
    Require host host_name.domain_name
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

暫無
暫無

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

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