Configure virtual host on Ubuntu

0

I'm trying to set up the virtual host on my Deepin OS and nothing I did works. Before you mark the question as duplicate, all the alternatives I've seen here in the forum I've tried and did not succeed, I saw several and several videos on youtube and tbm does not work. Currently my virtualhost is like this

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName gymdoctor.dev
    ServerAlias www.gymdoctor.dev
    DocumentRoot /var/www/gymdoctor.dev/public/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

I have also tried with the directory options and point to the public folder of the project in laravel and nothing. Does anyone know of any way to solve this or the problem is in the OS I use since all the tutorials for Ubuntu I have tried.

SOLVED: I was using mysite.dev to create the vhost, I switched to mysite.test and it worked correctly.

    
asked by anonymous 10.02.2018 / 14:05

1 answer

1

Change the extension of:

/etc/apache3/sites-available/meusite.dev

For .conf

/etc/apache3/sites-available/meusite.dev.conf

The same for:

/etc/apache3/sites-available/gymdoctor.dev

For .conf

/etc/apache3/sites-available/gymdoctor.dev.conf

Extra notes:

The notes here are for future visitors:

Do not forget to add in the hosts, so edit the file /ect/hosts (probably requires sudo ), an example if you have nano :

sudo nano /etc/hosts

Then leave it similar to this:

127.0.0.1   localhost
127.0.1.1   meusite.dev
    
10.02.2018 / 18:37