0

I downloaded xampp on Linux Ubuntu 24.04 LTS I configured the vhost correctly I configured the Linux hosts file and also the httpd.conf file I adjusted the permissions of the htdocs folder but when I access the website http://mywebsite.localhost it downloads the index.php instead of access.

My httpd-vhosts.conf and hosts files respectively.

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/opt/lampp/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 [email protected]
    DocumentRoot "/opt/lampp/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 *:80>
    ServerAdmin [email protected]
    DocumentRoot "/opt/lampp/htdocs/mywebsite"
    ServerName mywebsite.localhost
    ErrorLog "logs/mywebsite-error_log"
    CustomLog "logs/mywebsite-access_log" common
</VirtualHost>

127.0.0.1 localhost
127.0.1.1 LaptopUbuntu24
127.0.0.1 mywebsite.localhost

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I looked for some tutorials but none solved my problem.

3

0

Browse other questions tagged or ask your own question.