我项目的一个URL需要具有下面的URL castingforprod.localhost/casting
是从我的apache虚拟主机文件中配置的:
<VirtualHost *:80>
DocumentRoot /storage/projects/casting/
ServerName castingforprod.localhost/casting
<Directory /storage/projects/casting/>
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
我还添加了
127.0.0.1 castingforprod.localhost/casting
在我的/etc/hosts
文件中。
但是点击http://castingforprod.localhost/casting
给我404错误。设置完配置后,我将重新启动apache服务器。
如何使用serverName上的/
进行此操作。