enable Localhost/site

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

enable Localhost/site

Postby doomish » 30. July 2014 11:20

Hi All,
how do you make xampp latest version allow to have websites running on : localhost/sitename in earlier versions it used to work fine with no hassle, now i have to create virtual hosts per website.

any help appreciated.
doomish
 
Posts: 2
Joined: 30. July 2014 10:55
Operating System: mac

Re: enable Localhost/site

Postby Nobbie » 30. July 2014 13:46

doomish wrote:now i have to create virtual hosts per website


No, this is simply wrong.
Nobbie
 
Posts: 8762
Joined: 09. March 2008 13:04

Re: enable Localhost/site

Postby doomish » 30. July 2014 20:47

Any idea what might be wrong?
im gonna reinstall xampp once again, delete all the app/files and see how it goes
doomish
 
Posts: 2
Joined: 30. July 2014 10:55
Operating System: mac

Re: enable Localhost/site

Postby Nobbie » 30. July 2014 22:23

doomish wrote:Any idea what might be wrong?


How should i? No description, no error message, no nothing, not even one byte. Onyl a false clue.

I dont have the slightest idea what you are speaking about.
Nobbie
 
Posts: 8762
Joined: 09. March 2008 13:04

Re: enable Localhost/site

Postby webmaestro » 21. August 2014 18:14

It looks like the userdir stuff reverted to httpd defaults...

This is a bit of a waste of time, so it would be *really* nice if our http://ApacheFriends.org would make this the DEFAULT for Mac OS X. I don't know where to submit a 'PATCH' for this, so the bottom of this post has my 'PATCH'... :idea:

This post has the fix:

https://community.apachefriends.org/f/viewtopic.php?f=29&t=58599&sid=2058c6ca8f77de9ae9ebf4f086b07d59#p216859

Solved!

This worked for me:
open the file

Code: Select all
sudo vi /Applications/XAMPP/etc/httpd.conf


uncomment line 482

Code: Select all
# User home directories
Include /Applications/XAMPP/etc/extra/httpd-userdir.conf


save and close the file

open the file

Code: Select all
sudo vi /Applications/XAMPP/etc/extra/httpd-userdir.conf


replace line 11 with

Code: Select all
UserDir Sites


replace line 16 with

Code: Select all
<Directory "/Users/*/Sites/">


save and close the file

restart Apache
that's all!


BAD CODE in /Applications/XAMPP/etc/httpd.conf:

Code: Select all
# User home directories
#Include etc/extra/httpd-userdir.conf


GOOD CODE to apply in /Applications/XAMPP/etc/httpd.conf (uncomment this line):

Code: Select all
# User home directories
Include etc/extra/httpd-userdir.conf


And here's the 'patch' for /Applications/XAMPP/etc/extra/httpd-userdir.conf

Code: Select all
# Settings for user home directories
#
# Required module: mod_authz_core, mod_authz_host, mod_userdir

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.  Note that you must also set
# the default access control for these directories, as in the example below.
#
#UserDir public_html
UserDir Sites

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/Users/*/Sites">
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    Require method GET POST OPTIONS
</Directory>
webmaestro
 
Posts: 3
Joined: 21. August 2014 18:02
Operating System: Mac OS X 10.10

Re: enable Localhost/site

Postby webmaestro » 23. December 2015 21:47

It sure would be great if someone at ApacheFriends.org would apply the above patch!

It's been broken in XAMPP for years...
webmaestro
 
Posts: 3
Joined: 21. August 2014 18:02
Operating System: Mac OS X 10.10


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 7 guests