小编Par*_*ora的帖子

如何在XAMPP上创建虚拟主机

我确信这个问题被多次询问,但我没有遇到问题.我正在使用XAMPP配置Zend框架.

XAMPP正在端口8081上运行,因为80正被某些Windows进程占用,我需要使用虚拟主机,我使用以下代码C:/xampp/apache/config/extra/httpd-vhosts.config(或C:/xampp/apache/conf/extra/httpd-vhosts.conf在较新的版本中)进行配置.

<VirtualHost *:80>
ServerName comm-app.local
DocumentRoot "C:/xampp/htdocs/CommunicationApp/public"
SetEnv APPLICATION_ENV "development"
    <Directory "C:/xampp/htdocs/CommunicationApp/public"
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>    
Run Code Online (Sandbox Code Playgroud)

并更新hosts文件127.0.0.1 comm-app.local并尝试重新启动apache但它显示错误.

15:03:01  [Apache]  Error: Apache shutdown unexpectedly.
15:03:01  [Apache]  This may be due to a blocked port, missing dependencies, 
15:03:01  [Apache]  improper privileges, a crash, or a shutdown by another method.
15:03:01  [Apache]  Press the Logs button to view error logs and check
15:03:01  [Apache] …
Run Code Online (Sandbox Code Playgroud)

php apache xampp zend-framework virtualhost

72
推荐指数
6
解决办法
20万
查看次数

标签 统计

apache ×1

php ×1

virtualhost ×1

xampp ×1

zend-framework ×1