我很震惊在这里,创建一个项目,项目名称是医学。
我正在使用xampp。我在http.conf中写道就像。
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/medicals/public"
ServerName medicals.com
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "C:/xampp/htdocs/medicals/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
并且,使用Windows path:C:\Windows\System32\drivers\etc
指向。
127.0.0.1 medicals.com
我的浏览器在访问medicals.com
时出错。
实际问题在哪里。我不明白。
提前谢谢。
答案 0 :(得分:1)
复制以下代码:
<VirtualHost *:80>
ServerName medicals.com
DocumentRoot "C:/xampp/htdocs/medicals/public"
SetEnv APPLICATION_ENV "development"
<Directory "C:/xampp/htdocs/medicals/public">
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
要:
C:/xampp/apache/conf/extra/httpd-vhosts.conf
并添加以下内容:
127.0.0.1 medicals.com
到
C:/Windows/System32/drivers/etc
并确保您的mod_rewrite
已启用,并且不要忘记在更改后重新启动Apache服务器。
这在zf3中对我有用。如果它在zf1中不起作用,您可能需要查看此内容。 https://framework.zend.com/manual/1.10/en/project-structure.rewrite.html
答案 1 :(得分:1)