Mobile app version of vmapp.org
Login or Join
Welton855

: Virtual Host under MacOSX not working I have setup a virtualhost for MacOSX Apache installation. These are my steps: edit /private/etc/apache2/httpd.conf removing comment from: Include /private/etc/apache2/extra/httpd-vhosts.conf

@Welton855

Posted in: #Apache #Mac #Virtualhost

I have setup a virtualhost for MacOSX Apache installation.

These are my steps:


edit /private/etc/apache2/httpd.conf removing comment from:

Include /private/etc/apache2/extra/httpd-vhosts.conf

edit /private/etc/apache2/extra/httpd-vhosts.conf, added:



<VirtualHost *:80>
ServerName test.local
DocumentRoot "/Users/myusername/Sites/Test/public"
<Directory "/Users/myusername/Sites/Test/public">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>



edit /private/etc/hosts added

127.0.0.1 test.local

Restart Apache


But the VirtualHost does not work. To further isolate the problem, I check the same configuration with MAMP and the virtual host worked right, so the configuration files should be fine.

What can be wrong?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton855

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gloria169

Maybe your config has wrong IP?

127.0.0.7 test.local


This one should work just fine:

127.0.0.1 test.local


Additionally you may have incorrect <VirtualHost> directives formatting (unless this is happened when you inserted text here). Instead of

Options Indexes FollowSymLinks
Includes AllowOverride All


should be

Options Indexes FollowSymLinks Includes
AllowOverride All

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme