Federico Nastasi Federico Nastasi - 24 days ago 6
Apache Configuration Question

Problems with virtual host

I'm using Xampp, and I'm developing a web app.

in 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>


and in etc/hosts

127.0.0.1 timeline.dev


On my browser I write timeline.dev it reaches the html but it's not rendered well because the path are not ok.
My intention would be that when I write timeline.dev it goes right to
htdocs/ProgettoTimelinegit/web/app/index.html
.

in /api/index.php (that calls the routes) there is the backend and in /web the frontend .
Why if I write 'timeline.dev/index.php/route' in the http request,it appends like this ?

localhost:9000/timeline.dev/index.php/route

Answer

change DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/api" to DocumentRoot "C:/xampp/htdocs/ProgettoTimelinegit/app"