Problems with virtual hosts

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Problems with virtual hosts

Postby omega_red » 30. September 2009 16:14

Hello,

I can't get virtual hosts to work.

I've modified the httpd.conf:
# Virtual hosts
Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf


My httpd-vhosts.conf file:
NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /Applications/XAMPP/xamppfiles/htdocs
ServerName localhost
</VirtualHost>

<Directory "/Users/username/Documents/Fontys">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /Users/username/Documents/Fontys
ServerName fontys
</VirtualHost>


And my hosts file:
127.0.0.1 localhost
127.0.0.1 fontys


When i visit http://localhost it works but if i visit http://fontys i get an "Access prohibited" error.

Can anyone point me in the right direction?

Thanks!
omega_red
 
Posts: 3
Joined: 30. September 2009 15:53

Re: Problems with virtual hosts

Postby Nobbie » 30. September 2009 16:46

Probably the User running Apache (i.e. User Nobody, see httpd.conf) lacks sufficient rights for accessing /Users/username/Documents/Fontys
Nobbie
 
Posts: 13179
Joined: 09. March 2008 13:04

Re: Problems with virtual hosts

Postby omega_red » 30. September 2009 17:23

i've replaced the user nobody by my username and it now works!

thanks!
omega_red
 
Posts: 3
Joined: 30. September 2009 15:53


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 104 guests