I am working in localhost, I've created a domain like this

in /etc/hosts *.example.com

in /etc/apache2/extra/httpd-vhosts.conf

<VirtualHost *:80>
    ServerName *.example.local
    DocumentRoot "/path/to/workspace/example"
    SetEnv ENV_MODE "development"

Then when I try to type any url like : http://something.example.local or http://whatever.example.local, it doesn't work.

before I have a lot of configurations, one for www.example.local, another for anything.example.local, other.example.local, etc... but this is tedious because I can have a lot of subdomains, and I would like to set all in one with a wildcard or something similar.

As I said in the title, I am with OS X El Capitan.

Thanks !


Your Answer

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

Browse other questions tagged or ask your own question.