1
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 saw here on the forum I 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 tried also with directory options and point to the public folder of the project in Laravel and nothing. Does anyone know any way to solve this or the problem is in the OS that I use since all the tutorials for Ubuntu I tried.
SOLVED: I was using meusite.dev to create vhost, switched to meusite.test and it worked correctly.
Which Apache file did you edit exactly? And in which folder? Apache installation was via
apt-get
or installed something independent of the official repository? Give details so that we can know what you did and so be able to guide you.– Guilherme Nascimento
apache was installed via apt-get. The files I edited was in the /etc/apache3/sites-available/meusite.dev folder
<VirtualHost *:80>
 ServerName meusite.dev
 ServerAlias www.meusite.dev
 ServerAdmin [email protected]
 DocumentRoot /var/www/gymdoctor/public
 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
and on/etc/hosts I just added 127.0.0.1 meusite.dev– Felipe Paz
you added in hosts the address
meusite.dev
to point to 127.0.0.1?– Guilherme Nascimento
Yes, I did. In Chrome it doesn’t work and in firefox it takes the index of the folder /var/www/html and not /var/www/meusite.dev/public
– Felipe Paz
Felipe I answered
– Guilherme Nascimento