虚拟主机的问题
Problems with virtual host
我正在使用 Xampp,并且正在开发网络应用程序。
在 httpd-vhosts.conf 中:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/api"
ServerName timeline.dev
<Directory "C:/xampp/htdocs/ProgettoTimelinegit/web/app/index.html">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride Authconfig FileInfo
Require all granted
</Directory>
</VirtualHost>
并在 etc/hosts
127.0.0.1 timeline.dev
在我的浏览器上我写了 timeline.dev 它到达了 html 但它没有很好地呈现,因为路径不正确。
我的意图是,当我写 timeline.dev 时,它会直接转到 htdocs/ProgettoTimelinegit/web/app/index.html
.
在 /api/index.php(调用路由)中有后端,在 /web 中有前端。
为什么如果我在 http 请求中写 'timeline.dev/index.php/route',它会像这样附加?
localhost:9000/timeline.dev/index.php/route
改变
DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/api"
到
DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/app"
我正在使用 Xampp,并且正在开发网络应用程序。
在 httpd-vhosts.conf 中:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/api"
ServerName timeline.dev
<Directory "C:/xampp/htdocs/ProgettoTimelinegit/web/app/index.html">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride Authconfig FileInfo
Require all granted
</Directory>
</VirtualHost>
并在 etc/hosts
127.0.0.1 timeline.dev
在我的浏览器上我写了 timeline.dev 它到达了 html 但它没有很好地呈现,因为路径不正确。
我的意图是,当我写 timeline.dev 时,它会直接转到 htdocs/ProgettoTimelinegit/web/app/index.html
.
在 /api/index.php(调用路由)中有后端,在 /web 中有前端。 为什么如果我在 http 请求中写 'timeline.dev/index.php/route',它会像这样附加?
localhost:9000/timeline.dev/index.php/route
改变
DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/api"
到
DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/app"