1

I have two local web site project, localgoogle.com and localapple.com.

localgoogle.com files are in /home/vahid/dev/localgoogle

localapple.com files are in /home/vahid/dev/localapple

My OS is debian 8.5, I have apache2 installed.

I made /etc/apache2/sites-available/localgoogle.com.conf

and /etc/apache2/sites-available/localapple.com.conf

both linked to /etc/apache2/sites-enabled and enabled by a2ensite command.

This is localgoole.com.conf:

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

localapple conf file follow above configuration rule.

I restarted apache2 service, but I don't know why and how to access this virtualhosts from browser!

I tried localhost/localgoogle.com in browser but It's return Not Found

1 Answer 1

0

You access the site directly as localgoogle.com from your browser. Make sure that the name resolves to your local ip address using hosts file or dns.

1
  • What the f :D. tnx ;)
    – Vahid
    Commented Jul 20, 2016 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.