【问题标题】:Domain not configuring on XAMPP instead of localhost域未在 XAMPP 而不是 localhost 上配置
【发布时间】:2021-11-07 22:07:45
【问题描述】:

7 个月前我进行了一次讨论 here。然后,在我的笔记本电脑上,我可以很容易地通过 WordPress.test 的名称配置本地域,这取决于我在那里被告知的方式和内容。一切正常。我今天在我的桌面上安装了 xampp,并做了同样的事情。

2 different paths 上提供了相同的文件。

我将这段代码放在两个文件中:

<VirtualHost *:80>
    SetOutputFilter DEFLATE 
    <Directory "F:\codegorithm\wordpress">  #any path to which you wish to apply gzip compression to!
    Options All
    AllowOverride All
    Require all granted
        <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/plain
            AddOutputFilterByType DEFLATE text/html
            AddOutputFilterByType DEFLATE text/xml
            AddOutputFilterByType DEFLATE text/css
            AddOutputFilterByType DEFLATE application/xml
            AddOutputFilterByType DEFLATE application/xhtml+xml
            AddOutputFilterByType DEFLATE application/rss+xml
            AddOutputFilterByType DEFLATE application/javascript
            AddOutputFilterByType DEFLATE application/x-javascript
        </IfModule>
    </Directory> 
    DocumentRoot "F:\codegorithm\wordpress"  
    ServerName wordpress.test
</VirtualHost>

在浏览器中连接不上并给出this error(XAMPP重启了很多次)。

【问题讨论】:

  • 我是新手,不允许嵌入图片。

标签: php xampp localhost


【解决方案1】:

我修好了。该文件也将被修复 → C:\Windows\System32\drivers\etc = hosts。

#
127.0.0.1 localhost
127.0.0.1 wordpress.test

【讨论】:

    猜你喜欢
    • 2022-01-03
    • 2012-06-24
    • 2019-01-15
    • 2017-01-05
    • 2017-06-01
    • 2015-09-30
    • 2017-10-13
    • 1970-01-01
    相关资源
    最近更新 更多