I am beginner php programmer. I have macOS Catalina and XAMPP (php+mysql+phpmyadmin).
I need virtual host.
I have in /etc/hosts:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 lukasz.test
In etc/extra/httpd=vhosts.conf i have:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error_log"
CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
# VirtualHost for lukasz.test
<VirtualHost *:80>
ServerAdmin webmaster@ lukasz.test
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/lukasz/public"
ServerName lukasz.test
<Directory "/Applications/XAMPP/xamppfiles/htdocs/lukasz/public">
ServerSignature Off
Options Indexes FollowSymLinks IncludesNoExec
AllowOverride All
#Order allow,deny <- You can remove this
#Allow from all <- and that
# Insert the following:
Require all granted
</Directory>
</VirtualHost>
When I open lukasz.test in my browser - I have file list from localhost. Not from localhost/lukasz/public
How can I repair it?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire