How to configure virtualhost for xampp in Ubuntu

0

Can anyone teach how to configure a virtualhost for xampp in ubuntu? I already tried this tutorial link but in the end I did not get the expected result, it would be something like typing in the browser: link and the browser already redirect directly to my application and not have to use the traditional link

    
asked by anonymous 23.01.2018 / 13:21

2 answers

2

Hi, how are you?

You must first uncomment the following line in /opt/lampp/etc/http.conf:

#Virtual Host

Include etc / extra / httpd-vhosts.conf

After this edit the file: /opt/lampp/etc/extra/httpd-vhost.conf

<VirtualHost myaplication:80>
   DocumentRoot "/opt/lampp/htdocs/pasta-do-projeto"
   ServerName myaplication
   <Directory "/opt/lampp/htdocs/pasta-do-projeto">
       AllowOverride All
       Require all granted
   </Directory>
</VirtualHost>

Finally edit the file and add the same virtualhost name you created: / etc / hosts

Restartapacheandtrytoaccess link

    
23.01.2018 / 13:45
0

Even an efficient localhost and have all the same features as xampp use LAMP ... LAMP has everything XAMPP has and the installation is super easy, in ubuntu you install with the command:

sudo apt-get install lamp-server^

More details here: link

    
23.01.2018 / 13:26